How to Install MediaWiki on Kali Linux

MediaWiki is a popular open-source software used to manage wikis. It was originally developed for Wikipedia but can be used for other wikis as well. If you're running Kali Linux and want to install MediaWiki, you can follow the below steps.

Prerequisites

Before you begin, make sure you have the following:

Step 1: Download MediaWiki

Go to the MediaWiki download page at https://www.mediawiki.org/wiki/MediaWiki and download the latest version of the software. You can do this by clicking on the "Download" button on the page.

Step 2: Extract the MediaWiki package

After you've downloaded MediaWiki, extract the package using the following command:

tar -xvzf mediawiki-x.xx.x.tar.gz

Replace x.xx.x with the version number of the MediaWiki you downloaded.

Step 3: Move MediaWiki to the web root directory

Move the extracted files to the web root directory (/var/www/html) using the following command:

sudo mv mediawiki-x.xx.x /var/www/html/mediawiki

Step 4: Create a database for MediaWiki

Log in to MySQL or MariaDB using the following command:

mysql -u root -p

Create a new database for MediaWiki using the following command:

CREATE DATABASE mediawiki;

Create a new user for MediaWiki using the following command:

CREATE USER 'mediawikiuser'@'localhost' IDENTIFIED BY 'password';

Grant the new user full privileges to the new database using the following command:

GRANT ALL PRIVILEGES ON mediawiki.* TO 'mediawikiuser'@'localhost';

Flush the privileges using the following command:

FLUSH PRIVILEGES;

Exit the MySQL or MariaDB shell using the following command:

exit;

Step 5: Configure MediaWiki

In the web browser, navigate to http://localhost/mediawiki/config/index.php.

Follow the instructions in the configuration page to set up your MediaWiki installation.

When prompted for the database type, enter "mysql" or "mysqli" depending on the version of the database you're using.

When prompted for the database name, enter "mediawiki" (the name of the database you created earlier).

When prompted for the username and password, enter "mediawikiuser" (the username you created earlier) and the password you set during the user creation process.

Step 6: Complete the installation

After you've configured MediaWiki, create an administrator account when prompted.

Once you've created the administrator account, you can use MediaWiki to manage your wikis.

Conclusion

In this tutorial, you learned how to install MediaWiki on Kali Linux. By following the above steps, you should be able to have a fully functional MediaWiki installation up and running in no time.

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!