Mediawiki is a free and open-source software that allows users to create and edit web-based content. In this tutorial, we will explain how to install Mediawiki on Void Linux.
The first step is to install the Apache web server. To do this, run the following command in your terminal:
sudo xbps-install -S apache
After the installation is complete, start and enable Apache on system boot with the following commands:
sudo ln -s /etc/sv/apache /var/service/
sudo sv start apache
Mediawiki requires PHP to be installed on your system. To install PHP, run the following command:
sudo xbps-install -S php
Mediawiki requires a database management system to store its data. We recommend using MariaDB. To install MariaDB, run:
sudo xbps-install -S mariadb
After installation, start and enable MariaDB on system boot with the following commands:
sudo ln -s /etc/sv/mariadb /var/service/
sudo sv start mariadb
Now that the database management system is installed, you need to create a database for Mediawiki. Run the following command in your terminal:
sudo mysql_secure_installation
Follow the on-screen instructions to secure your MariaDB installation. Once that is done, create a database and user for Mediawiki:
sudo mysql -u root -p
# At the MySQL prompt, create the database and user:
CREATE DATABASE wiki;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wiki.* TO 'wikiuser'@'localhost';
FLUSH PRIVILEGES;
exit;
Replace 'password' with a strong password for the user.
Next, download the latest version of Mediawiki from the official website:
wget https://releases.wikimedia.org/mediawiki/1.xx/mediawiki-1.xx.x.tar.gz
Replace 1.xx.x with the version of Mediawiki you want to install. Next, extract the archive to the Apache document root:
sudo tar -xvzf mediawiki-1.xx.x.tar.gz -C /srv/http/
sudo mv /srv/http/mediawiki-1.xx.x /srv/http/wiki
sudo chown -R apache:apache /srv/http/wiki
Replace /srv/http/ with your Apache document root directory.
Open your web browser and navigate to http://localhost/wiki/. You will see a page prompting you to set up Mediawiki.
Follow the installation steps, and when prompted for the database information, enter the database name, username, and password you created in Step 4.
Once the installation is complete, you can start using Mediawiki to create and edit web-based content.
In this tutorial, we have explained how to install Mediawiki on Void Linux. Now you can start using Mediawiki to create and edit web-based content on your server.
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!