Microsoft Azure
- Microsoft 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's designed for newcomers to both Azure and MediaWiki server administration. We will cover essential aspects including virtual machine selection, database setup, and recommended software configurations.
== 1. Introduction to Azure for MediaWiki
Microsoft Azure offers a robust and scalable cloud platform suitable for hosting MediaWiki installations of varying sizes. Using Azure provides benefits such as global availability, pay-as-you-go pricing, and a wide range of services to enhance performance and reliability. Proper planning and configuration are crucial for a successful deployment. Before starting, ensure you have an active Azure subscription and a basic understanding of virtual machines and cloud computing.
== 2. Virtual Machine Selection
Choosing the right virtual machine (VM) size is critical. Consider the expected traffic, number of users, and content size of your MediaWiki site. Here's a comparison of suitable VM families:
VM Family | vCPUs | Memory (GiB) | Estimated Cost (USD/month) | Recommended Use Case |
---|---|---|---|---|
B-series (Burstable) | 1-8 | 2-32 | $20 - $150 | Low-traffic wikis, testing, development |
D-series (General Purpose) | 2-128 | 8-1024 | $80 - $2000+ | Medium to high-traffic wikis, production environments |
E-series (Memory Optimized) | 8-48 | 64-384 | $300 - $1500+ | Large wikis with complex extensions, heavy caching requirements |
For a starting point, a D2s v3 (2 vCPUs, 8 GiB RAM) is often sufficient for a small to medium-sized wiki. You can always scale up later as needed using Azure's scaling features. Always refer to the latest Azure pricing documentation for accurate cost estimates. Consider using Azure Monitor for performance tracking and capacity planning.
== 3. Operating System and Software Stack
We recommend using a Linux distribution like Ubuntu Server 22.04 LTS or CentOS 7/8. These distributions are well-supported and offer excellent performance. The core software stack will include:
Ensure the operating system is fully updated using the appropriate package manager (e.g., `apt update && apt upgrade` for Ubuntu). Proper security hardening is essential.
== 4. Database Configuration
MediaWiki requires a robust database to store its content and configuration. You can use Azure Database for MySQL or MariaDB, or install MySQL/MariaDB directly on the VM. Here's a comparison:
Database Option | Management | Scalability | Cost | Complexity |
---|---|---|---|---|
Azure Database for MySQL/MariaDB | Fully managed by Azure | Highly scalable | Higher cost | Lower complexity |
MySQL/MariaDB on VM | Self-managed | Scalable with VM size | Lower cost | Higher complexity |
If choosing to install MySQL/MariaDB on the VM, allocate sufficient disk space and memory. A basic configuration might look like this:
Parameter | Value |
---|---|
`innodb_buffer_pool_size` | 512M - 2G (depending on RAM) |
`max_connections` | 150 - 500 (depending on traffic) |
`character_set_server` | `utf8mb4` |
`collation_server` | `utf8mb4_unicode_ci` |
Always create a dedicated database user for MediaWiki with limited privileges. Refer to the MySQL documentation and MariaDB documentation for detailed configuration options.
== 5. PHP Configuration
PHP requires specific extensions and settings to run MediaWiki. Install the following extensions:
- `php-mysql` or `php-mysqli`
- `php-intl`
- `php-gd`
- `php-mbstring`
- `php-xml`
- `php-zip`
- `php-curl`
Configure `php.ini` with appropriate settings:
- `memory_limit = 256M` or higher
- `upload_max_filesize = 100M` (adjust as needed)
- `post_max_size = 100M` (adjust as needed)
- `max_execution_time = 300`
Enable PHP OPcache for improved performance.
== 6. Apache Configuration
Configure Apache to serve your MediaWiki installation. Create a virtual host configuration file for your domain. Ensure that `mod_rewrite` is enabled for proper URL rewriting. Consider using HTTPS for secure communication. An example Apache configuration snippet:
```apache <VirtualHost *:80>
ServerName yourdomain.com DocumentRoot /var/www/mediawiki
<Directory /var/www/mediawiki> Options FollowSymLinks AllowOverride All Require all granted </Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> ```
== 7. MediaWiki Installation and Configuration
Download the latest MediaWiki 1.40 release from the official website. Extract the archive to your web server's document root. Run the installation script through your web browser, following the on-screen instructions. Provide the database connection details and an administrator account. After installation, configure `LocalSettings.php` with your specific settings.
== 8. Security Considerations
- Regularly update the operating system, PHP, and database software.
- Use strong passwords for all accounts.
- Enable HTTPS.
- Configure a firewall to restrict access to necessary ports.
- Implement access control to limit who can edit and administer the wiki.
- Consider using a Web Application Firewall (WAF) for added protection.
== 9. Scaling and Performance Optimization
- Use caching mechanisms like Memcached or Redis.
- Optimize database queries.
- Use a Content Delivery Network (CDN) to serve static assets.
- Monitor performance using Azure Monitor and optimize resource allocation.
- Consider using Azure's auto-scaling features to automatically adjust VM size based on demand.
Azure portal Virtual Networks Azure Storage Load Balancing Azure Active Directory Disaster Recovery
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.* ⚠️