Server rental store

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 ServerName yourdomain.com # Replace with your domain DocumentRoot /var/www/html/mediawiki

Options FollowSymLinks AllowOverride All Require all granted

ErrorLog ${APACHE_LOG_DIR}/mediawiki_error.log CustomLog ${APACHE_LOG_DIR}/mediawiki_access.log combined ```

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

⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️