CentOS Stream
- CentOS Stream Server Configuration for MediaWiki 1.40
This article details the recommended server configuration for running MediaWiki 1.40 on a CentOS Stream based system. It's geared towards system administrators and those new to deploying MediaWiki. CentOS Stream is a rolling-release Linux distribution, so maintaining up-to-date packages is crucial for security and stability. This guide focuses on a basic, functional setup; advanced configurations like Load balancing and Caching are outside the scope of this document.
== System Requirements
The following table outlines the minimum and recommended system requirements for a MediaWiki installation. These numbers are *estimates* and will vary based on wiki size, traffic, and usage patterns.
Requirement | Minimum | Recommended |
---|---|---|
CPU | 2 Cores | 4+ Cores |
RAM | 4 GB | 8+ GB |
Disk Space | 20 GB | 50+ GB (SSD preferred) |
Operating System | CentOS Stream 8 or 9 | CentOS Stream 9 (latest) |
Web Server | Apache 2.4 or Nginx 1.18 | Apache 2.4 or Nginx 1.20+ |
Database | MariaDB 10.3 or PostgreSQL 12 | MariaDB 10.6+ or PostgreSQL 14+ |
It's important to note that these are starting points. A heavily used wiki with many images and frequent edits will require significantly more resources. Regularly monitor your server's performance using tools like top, htop, and vmstat.
== Software Installation
This section outlines the installation of the necessary software components.
1. **Update the System:**
```bash sudo dnf update -y ```
2. **Install the Web Server (Apache):**
```bash sudo dnf install httpd -y sudo systemctl start httpd sudo systemctl enable httpd ``` Or, if you prefer Nginx: ```bash sudo dnf install nginx -y sudo systemctl start nginx sudo systemctl enable nginx ``` Remember to configure your firewall to allow HTTP (port 80) and HTTPS (port 443) traffic. This is typically done with firewalld.
3. **Install the Database (MariaDB):**
```bash sudo dnf install mariadb-server mariadb -y sudo systemctl start mariadb sudo systemctl enable mariadb sudo mysql_secure_installation ``` Follow the prompts to set a root password and secure your MariaDB installation. Consider using a stronger password than the default.
4. **Install PHP and Required Extensions:**
```bash sudo dnf install php php-mysqlnd php-gd php-xml php-mbstring php-intl php-zip php-bcmath php-curl -y ``` Ensure the PHP version is compatible with MediaWiki 1.40 (PHP 7.4 or higher is recommended).
== PHP Configuration
Proper PHP configuration is critical for MediaWiki performance and security. Adjust the `php.ini` file (usually located in `/etc/php.ini`) with the following settings:
Setting | Value | Description |
---|---|---|
`memory_limit` | 256M | Maximum memory a script may consume. Increase if you encounter memory errors. |
`upload_max_filesize` | 100M | Maximum allowed size for uploaded files. Adjust based on your wiki's needs. |
`post_max_size` | 100M | Maximum size of POST data that PHP will accept. Must be greater than or equal to `upload_max_filesize`. |
`max_execution_time` | 300 | Maximum time a script is allowed to run. |
Restart the web server after making changes to `php.ini`. For Apache: `sudo systemctl restart httpd`. For Nginx: `sudo systemctl restart nginx`.
== MediaWiki Installation
1. **Download MediaWiki:** Download the latest stable release of MediaWiki 1.40 from the MediaWiki download page.
2. **Extract the Archive:** Extract the downloaded archive to your web server's document root (e.g., `/var/www/html` for Apache, or `/usr/share/nginx/html` for Nginx).
3. **Set File Permissions:** Ensure the web server user has appropriate permissions to read and write to the MediaWiki files and directories. For Apache, this is typically `apache`. For Nginx, it's often `nginx`.
```bash sudo chown -R apache:apache /var/www/html/mediawiki sudo chmod -R 755 /var/www/html/mediawiki ```
4. **Run the Installation Script:** Access the MediaWiki installation script through your web browser (e.g., `http://your_server_ip/mediawiki/index.php`). Follow the on-screen instructions to configure your wiki, including database connection details.
5. **Configure `LocalSettings.php`:** After the installation, edit the `LocalSettings.php` file to fine-tune your wiki's settings. Pay close attention to the `$wgSecretKey` setting for security.
== Security Considerations
- **HTTPS:** Always use HTTPS to encrypt communication between the server and clients. Use Let's Encrypt to obtain free SSL/TLS certificates.
- **Firewall:** Configure firewalld to restrict access to only necessary ports.
- **Regular Updates:** Keep your operating system, web server, database, and PHP up to date with the latest security patches.
- **Database Security:** Secure your MariaDB installation with a strong root password and restrict access to the database user used by MediaWiki.
- **File Permissions:** Limit file permissions to the minimum necessary for the web server user.
- **Backups:** Regularly back up your wiki's database and files to prevent data loss. Consider using a backup strategy.
== Troubleshooting
- **PHP Errors:** Check the web server's error logs for PHP errors.
- **Database Connection Errors:** Verify the database connection details in `LocalSettings.php`.
- **File Permissions:** Ensure the web server user has the necessary permissions to read and write to the MediaWiki files and directories.
- **Memory Errors:** Increase the `memory_limit` in `php.ini` if you encounter memory errors.
Special:Search | Help:Contents | Manual:Configuration | Manual:Installation | Server Configuration |
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.* ⚠️