AlmaLinux

From Server rental store
Revision as of 08:17, 15 April 2025 by Admin (talk | contribs) (Automated server configuration article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

AlmaLinux Server Configuration for MediaWiki

This article details configuring an AlmaLinux server for hosting a MediaWiki 1.40 installation. It’s geared towards newcomers to server administration and assumes a basic understanding of the command line. We will cover the initial server setup, required software installation, and basic security considerations.

1. Initial Server Setup

Before installing MediaWiki, a base AlmaLinux server installation is required. This guide assumes a minimal installation via the command line. Ensure your server has a static IP address configured. You can configure this via `nmtui` or manually edit network configuration files. It’s crucial to have root access or a user with `sudo` privileges.

First, update the system:

```bash sudo dnf update -y ```

Next, set the hostname:

```bash sudo hostnamectl set-hostname mediawiki.example.com ```

(Replace `mediawiki.example.com` with your desired hostname.)

2. Installing Required Software

MediaWiki relies on several components. We’ll install these using the `dnf` package manager. This includes a web server (Apache), a database server (MariaDB), PHP, and necessary PHP extensions.

2.1. Apache Web Server

Apache will serve the MediaWiki files to users.

```bash sudo dnf install httpd -y sudo systemctl start httpd sudo systemctl enable httpd ```

Configure the firewall to allow HTTP (port 80) and HTTPS (port 443) traffic:

```bash sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload ```

2.2. MariaDB Database Server

MariaDB will store the MediaWiki data.

```bash sudo dnf install mariadb-server mariadb -y sudo systemctl start mariadb sudo systemctl enable mariadb ```

Secure the MariaDB installation:

```bash sudo mysql_secure_installation ```

Follow the prompts to set a root password, remove anonymous users, disallow remote root login, and remove the test database.

2.3. PHP and Extensions

PHP is the scripting language MediaWiki is built upon. We need to install PHP and several required extensions.

```bash sudo dnf install php php-mysqlnd php-gd php-mbstring php-xml php-zip php-intl php-bcmath php-curl -y ```

Restart Apache after installing PHP:

```bash sudo systemctl restart httpd ```

3. PHP Configuration

Adjust the PHP configuration to optimize MediaWiki performance. Edit `/etc/php.ini` and adjust the following settings:

  • `memory_limit = 256M` (or higher, depending on your wiki size)
  • `upload_max_filesize = 100M` (or as needed)
  • `post_max_size = 100M` (or as needed)
  • `max_execution_time = 300`

Restart Apache after modifying `php.ini`:

```bash sudo systemctl restart httpd ```

4. Server Specifications

Here's a table outlining recommended server specifications for different MediaWiki usage scenarios:

Usage Scenario CPU RAM Storage Concurrent Users (approx.)
Small Wiki (Testing/Personal) 1 Core 2 GB 20 GB SSD 10
Medium Wiki (Community/Department) 2-4 Cores 4-8 GB 50-100 GB SSD 50-100
Large Wiki (High Traffic) 4+ Cores 8+ GB 100+ GB SSD 100+

These are estimates; actual requirements vary based on content size, extensions, and traffic patterns.

5. Security Considerations

Securing your server is paramount. Consider the following:

  • Firewall: Ensure the firewall is properly configured to only allow necessary traffic.
  • Regular Updates: Keep the operating system and all software packages up to date.
  • HTTPS: Implement HTTPS using Let's Encrypt or a similar certificate authority. See HTTPS Configuration.
  • Database Security: Use a strong MariaDB root password and restrict database access. See Database Security.
  • File Permissions: Set appropriate file permissions for MediaWiki files. See File Permissions.
  • User Accounts: Limit the number of users with root access.
  • Regular Backups: Implement a regular backup strategy for both the database and the MediaWiki files. See Backup Strategy.

6. AlmaLinux Version Information

Component Version (as of Oct 26, 2023)
AlmaLinux OS 8.8 Apache 2.4.37 MariaDB 10.5.15 PHP 7.4.33

These versions may change with system updates. Use `dnf list installed` to view currently installed versions.

7. Useful AlmaLinux Commands

Here's a quick reference table of useful AlmaLinux commands:

Command Description
`dnf update` Updates all packages.
`dnf install <package>` Installs a package.
`systemctl start <service>` Starts a service.
`systemctl stop <service>` Stops a service.
`systemctl restart <service>` Restarts a service.
`systemctl enable <service>` Enables a service to start on boot.
`firewall-cmd --list-all` Lists firewall rules.
`mysql -u root -p` Connects to the MariaDB database.

8. Next Steps

After completing these steps, you’re ready to download and install MediaWiki. Refer to the official MediaWiki Download page and the Installation Guide for detailed instructions. Don't forget to configure the `LocalSettings.php` file. See LocalSettings.php Configuration for more details. You may also want to explore Performance Tuning options to optimize your wiki. Also, consider Extension Installation to add features to your wiki.


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?

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