How to Install Mediawiki on FreeBSD Latest

This tutorial will guide you through the process of installing Mediawiki on FreeBSD Latest using Apache as the web server and MariaDB as the database.

Prerequisites

Before we begin, you will need the following:

Step 1: Download the Mediawiki package

First, we will download the Mediawiki package from the official website. Use the following command:

cd /usr/local/www/
fetch https://releases.wikimedia.org/mediawiki/1.36/mediawiki-1.36.1.tar.gz

Step 2: Extract the Package

After downloading the Mediawiki package, we need to extract it. Use the following command:

tar xvf mediawiki-1.36.1.tar.gz

This will create a directory called mediawiki-1.36.1 in /usr/local/www/.

Step 3: Configure Apache

Next, we need to configure Apache to serve the Mediawiki files. Open the Apache configuration file using your favorite text editor. For example:

nano /usr/local/etc/apache24/httpd.conf

Add the following lines to the end of the file:

Alias /mediawiki/ "/usr/local/www/mediawiki-1.36.1/"
<Directory "/usr/local/www/mediawiki-1.36.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>

Save and close the file.

Step 4: Create a Database for Mediawiki

We need to create a database for Mediawiki to store its data. Use the following command to access MariaDB:

mysql -u root -p

Enter your password when prompted.

Next, create a new database and user for Mediawiki:

CREATE DATABASE mediawiki;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'wikipassword';
GRANT ALL PRIVILEGES ON mediawiki.* TO 'wikiuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Install Mediawiki

Now, we are ready to start the Mediawiki installation. Open your web browser and navigate to http://<server-ip>/mediawiki. You should see the installation wizard.

Follow the instructions on the screen, entering the database details when prompted:

Continue through the installation process until it is complete.

Step 6: Finished

Congratulations! You have successfully installed Mediawiki on FreeBSD Latest. You can now access your Mediawiki site by visiting http://<server-ip>/mediawiki.

Please note: for production environments, it is recommended that you secure your Mediawiki installation and configure backups to avoid data loss.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!