Azure
- Azure Server Configuration for MediaWiki 1.40
This article provides a comprehensive guide to configuring a MediaWiki 1.40 installation on the Microsoft Azure platform. It is geared towards newcomers to both Azure and MediaWiki administration. We will cover selecting a virtual machine, configuring the operating system, installing the necessary software, and hardening the server for optimal performance and security. This guide assumes a basic understanding of networking concepts. Refer to Help:Contents for general MediaWiki help.
1. Choosing an Azure Virtual Machine
Selecting the appropriate Azure Virtual Machine (VM) size is crucial for performance. The ideal size depends on the anticipated traffic, the size of the wiki, and the complexity of extensions used. Consider starting with a smaller instance and scaling up as needed. We will focus on using Linux VMs as they are often more cost-effective for MediaWiki hosting. See Manual:Configuration settings for more information on performance tuning.
Here's a comparison of commonly used VM sizes for MediaWiki:
VM Size | vCPUs | Memory (GiB) | Estimated Cost (USD/month - varies by region) | Suitable For |
---|---|---|---|---|
B1ls | 1 | 0.5 | $10 - $20 | Very small wikis, testing |
B2ms | 2 | 8 | $40 - $60 | Small wikis, low traffic |
D2s v3 | 2 | 8 | $60 - $90 | Medium wikis, moderate traffic |
D4s v3 | 4 | 16 | $120 - $180 | Large wikis, high traffic |
Remember to check the official Azure pricing calculator for the most up-to-date and region-specific costs. Also, consider using Azure Monitor for performance tracking.
2. Operating System Configuration
We recommend using Ubuntu Server 22.04 LTS as the operating system. This provides a stable and well-supported platform. After provisioning the VM, perform the following steps:
1. **Update the System:** Run `sudo apt update && sudo apt upgrade -y` to ensure you have the latest security patches. 2. **Create a New User:** Avoid using the root account directly. Create a dedicated user for MediaWiki administration: `sudo adduser mediaperson`. Add this user to the `sudo` group: `sudo usermod -aG sudo mediaperson`. 3. **Configure Firewall:** Use `ufw` to configure the firewall. Allow SSH (port 22), HTTP (port 80), and HTTPS (port 443) traffic:
* `sudo ufw allow 22` * `sudo ufw allow 80` * `sudo ufw allow 443` * `sudo ufw enable`
4. **Disable Password Authentication for SSH:** Enhance security by disabling password authentication and using SSH keys. See Manual:SSH access for details.
3. Software Installation
This section details the installation of the necessary software components.
1. **Web Server (Apache):** Install Apache using `sudo apt install apache2 -y`. 2. **PHP:** Install PHP and required modules: `sudo apt install php libapache2-mod-php php-cli php-mysql php-gd php-curl php-mbstring php-xml php-zip php-intl -y`. Verify the PHP version: `php -v`. 3. **MySQL/MariaDB:** Install MariaDB, a popular open-source database: `sudo apt install mariadb-server -y`. Secure the installation using `sudo mysql_secure_installation`. 4. **Composer:** Install Composer, a dependency manager for PHP: Follow the instructions on [1](https://getcomposer.org/).
4. MediaWiki Installation
1. **Download MediaWiki:** Download the latest stable version of MediaWiki (1.40) from [2](https://www.mediawiki.org/wiki/Download). 2. **Extract the Files:** Extract the downloaded archive to the web server's document root (usually `/var/www/html/`): `sudo tar -xzf MediaWiki-1.40.x.tar.gz -C /var/www/html/`. 3. **Configure the Database:** Create a database and user in MariaDB for MediaWiki. Grant appropriate privileges to the user. See Manual:Database setup for detailed instructions. 4. **Run the Installation Script:** Access the MediaWiki installation script through your web browser (e.g., `http://your_server_ip/mediawiki/`). Follow the on-screen instructions. 5. **Configure `LocalSettings.php`:** Edit the `LocalSettings.php` file (located in the `/var/www/html/mediawiki/`) to configure database credentials, site name, and other settings. See Configuration:Configuration settings for more details.
5. Server Hardening and Optimization
Here's a table summarizing some hardening and optimization steps:
Task | Description | Priority |
---|---|---|
Enable HTTPS | Use Let's Encrypt or other SSL certificate to encrypt traffic. | High |
Configure PHP Memory Limit | Adjust `memory_limit` in `php.ini` to an appropriate value (e.g., 256M or 512M). | Medium |
Enable OPcache | Enable PHP OPcache to improve performance. | Medium |
Regularly Update System | Keep the operating system and all software packages up to date. | High |
Configure Backups | Implement regular database and file system backups. Use Maintenance:Backups for guidance. | High |
6. Monitoring and Maintenance
- **Azure Monitor:** Utilize Azure Monitor to track server performance, CPU usage, memory consumption, and disk I/O.
- **Log Analysis:** Regularly review server logs (Apache, PHP, MariaDB) for errors or security issues.
- **Database Maintenance:** Perform regular database optimization tasks, such as analyzing and repairing tables. See Database maintenance for details.
- **Extension Updates:** Keep MediaWiki extensions updated to the latest versions.
7. Resource Allocation Table
This table provides a more detailed look at resource requirements based on wiki size.
Wiki Size | Estimated Users (Concurrent) | Recommended vCPUs | Recommended Memory (GiB) | Recommended Disk Space (GiB) |
---|---|---|---|---|
Small (1-10 articles) | 1-5 | 1-2 | 2-4 | 20-50 |
Medium (100-1000 articles) | 5-20 | 2-4 | 8-16 | 50-200 |
Large (1000+ articles) | 20+ | 4+ | 16+ | 200+ |
This article provides a starting point for deploying MediaWiki 1.40 on Azure. Remember to adapt the configuration to your specific needs and monitor performance closely. For more advanced configuration options, consult the official MediaWiki documentation and Azure documentation. Consider using a Load balancer for high availability. Also, explore Caching strategies for improved performance.
Intel-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Core i7-6700K/7700 Server | 64 GB DDR4, NVMe SSD 2 x 512 GB | CPU Benchmark: 8046 |
Core i7-8700 Server | 64 GB DDR4, NVMe SSD 2x1 TB | CPU Benchmark: 13124 |
Core i9-9900K Server | 128 GB DDR4, NVMe SSD 2 x 1 TB | CPU Benchmark: 49969 |
Core i9-13900 Server (64GB) | 64 GB RAM, 2x2 TB NVMe SSD | |
Core i9-13900 Server (128GB) | 128 GB RAM, 2x2 TB NVMe SSD | |
Core i5-13500 Server (64GB) | 64 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Server (128GB) | 128 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Workstation | 64 GB DDR5 RAM, 2 NVMe SSD, NVIDIA RTX 4000 |
AMD-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Ryzen 5 3600 Server | 64 GB RAM, 2x480 GB NVMe | CPU Benchmark: 17849 |
Ryzen 7 7700 Server | 64 GB DDR5 RAM, 2x1 TB NVMe | CPU Benchmark: 35224 |
Ryzen 9 5950X Server | 128 GB RAM, 2x4 TB NVMe | CPU Benchmark: 46045 |
Ryzen 9 7950X Server | 128 GB DDR5 ECC, 2x2 TB NVMe | CPU Benchmark: 63561 |
EPYC 7502P Server (128GB/1TB) | 128 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/2TB) | 128 GB RAM, 2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/4TB) | 128 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/1TB) | 256 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/4TB) | 256 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 9454P Server | 256 GB RAM, 2x2 TB NVMe |
Order Your Dedicated Server
Configure and order your ideal server configuration
Need Assistance?
- Telegram: @powervps Servers at a discounted price
⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️