DigitalOcean
- DigitalOcean Server Configuration for MediaWiki 1.40
This article details the recommended server configuration for running MediaWiki 1.40 on DigitalOcean. It’s geared towards newcomers to both MediaWiki and DigitalOcean, providing a step-by-step guide to setting up a suitable environment. This focuses on a basic, functional setup; advanced configurations (like load balancing or caching) are beyond the scope of this document. We will cover droplet size, operating system selection, software installation, and basic security considerations.
== Droplet Selection and Operating System
DigitalOcean provides virtual servers, called “Droplets”, which are ideal for hosting MediaWiki. The appropriate droplet size depends on the expected traffic and content volume. For a small to medium-sized wiki, a droplet with at least 2 GB of RAM is recommended. Larger wikis with more users and complex extensions will require more resources.
We recommend using Ubuntu 22.04 LTS as the operating system. It’s widely supported, has a large community, and offers excellent package management via `apt`. Debian is also a suitable choice. Avoid using minimal images unless you are very comfortable with Linux administration, as they require more manual configuration.
Here’s a table summarizing recommended droplet specifications:
Droplet Size | RAM | vCPUs | SSD Storage | Estimated Cost (USD/month) |
---|---|---|---|---|
Basic | 2 GB | 1 | 50 GB | $6 |
Standard | 4 GB | 2 | 80 GB | $12 |
Premium | 8 GB | 4 | 160 GB | $24 |
== Software Installation
Once you have provisioned a DigitalOcean droplet, connect to it via SSH. The following steps outline the software installation process.
1. **Update the Package List:**
```bash sudo apt update ```
2. **Install Apache2:**
```bash sudo apt install apache2 ```
3. **Install MariaDB:**
```bash sudo apt install mariadb-server ``` Secure the MariaDB installation: ```bash sudo mysql_secure_installation ```
4. **Install PHP and Required Extensions:**
```bash sudo apt install php libapache2-mod-php php-mysql php-gd php-curl php-mbstring php-xml php-zip ``` Verify PHP version: ```bash php -v ```
5. **Install other dependencies:**
```bash sudo apt install git ```
== MediaWiki Installation
1. **Download MediaWiki:**
```bash cd /var/www/html sudo git clone https://github.com/mediawiki/mediawiki.git sudo chown -R www-data:www-data mediawiki ```
2. **Configure Apache2:**
Create a new Apache configuration file for MediaWiki: ```bash sudo nano /etc/apache2/sites-available/mediawiki.conf ``` Add the following content (adjust `/var/www/html/mediawiki` to your installation path):
```apache <VirtualHost *:80> ServerName yourdomain.com # Replace with your domain DocumentRoot /var/www/html/mediawiki
<Directory /var/www/html/mediawiki> Options FollowSymLinks AllowOverride All Require all granted </Directory>
ErrorLog ${APACHE_LOG_DIR}/mediawiki_error.log CustomLog ${APACHE_LOG_DIR}/mediawiki_access.log combined </VirtualHost> ```
Enable the new configuration and disable the default one: ```bash sudo a2ensite mediawiki.conf sudo a2dissite 000-default.conf sudo systemctl restart apache2 ```
3. **Run the MediaWiki Installation Script:**
Access your wiki through your web browser (e.g., `http://yourdomain.com`). The MediaWiki installation script will guide you through the remaining steps, including database configuration.
4. **Database Configuration:** You'll need the MariaDB root password and create a dedicated database and user for MediaWiki.
== Security Considerations
- **Firewall:** Enable a firewall (like `ufw`) to restrict access to necessary ports (80 for HTTP, 443 for HTTPS, and 22 for SSH if you haven't disabled it).
```bash sudo ufw enable sudo ufw allow 80 sudo ufw allow 443 sudo ufw allow 22 # Only if you need SSH access ```
- **HTTPS:** Configure HTTPS using Let's Encrypt for secure communication. Use `certbot`:
```bash sudo apt install certbot python3-certbot-apache sudo certbot --apache -d yourdomain.com ```
- **Regular Updates:** Keep your operating system and all installed software up to date.
```bash sudo apt update sudo apt upgrade ```
- **Strong Passwords:** Use strong, unique passwords for all user accounts, including the database user.
== Advanced Configuration
Once MediaWiki is installed, you can further configure it. Consider these options:
- **Caching:** Implement a caching system (like Memcached or Redis) to improve performance.
- **Extensions:** Install extensions to add functionality to your wiki.
- **Load Balancing:** For high-traffic wikis, consider using a load balancer to distribute traffic across multiple servers.
- **Backups:** Implement regular backups of your wiki's files and database.
Here's a table summarizing common PHP extensions and their purpose:
PHP Extension | Purpose |
---|---|
php-mysql | Connect to MySQL/MariaDB databases |
php-gd | Image manipulation |
php-curl | Making HTTP requests |
php-mbstring | Multibyte string support |
php-xml | XML parsing |
php-zip | Zip archive support |
Finally, here's a table detailing important files and directories within the MediaWiki installation:
File/Directory | Description |
---|---|
config/ | Configuration files |
includes/ | Core MediaWiki code |
extensions/ | Directory for installed extensions |
images/ | Uploaded images |
LocalSettings.php | Main configuration file |
This guide provides a basic foundation for running MediaWiki 1.40 on DigitalOcean. Refer to the official MediaWiki documentation for more detailed information. Help:Contents provides further assistance. Manual:Configuration is a valuable resource.
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.* ⚠️