Status: This OS is no longer supported
This article, “How to install MediaWiki on CentOS/Fedora,” covers a version of CentOS that reached end of life (EOL) and is no longer supported. As such, this guide is no longer maintained. As such, if you are currently operating a server running CentOS 6, we highly recommend contacting RoseHosting’s fully managed support to upgrade or migrate to a supported version of AlmaLinux.
In this article, we will guide you on how to install MediaWiki on a CentOS/Fedora VPS. MediaWiki is a free, web-based wiki platform written in PHP, with powerful capabilities. It is one of the most popular applications of this type in the world.
Step-by-step Guide
1. Go to MediaWiki’s official website and download the latest version of the platform:
# wget http://download.wikimedia.org/mediawiki/1.19/mediawiki-1.19.2.tar.gz
2. Now you should extract the downloaded tar.gz file in your Apache Document Root directory:
# tar -xzvf mediawiki-1.19.2.tar.gz -C /var/www/html
3. To find out Apache’s document root directory, execute:
# grep '^DocumentRoot' /etc/httpd/conf/httpd.conf
4. Rename the extracted directory. In our case, we will rename the directory from ‘mediawiki-1.19.2’ to ‘mediawiki’:
# mv /var/www/html/mediawiki-1.19.2 /var/www/html/mediawiki
5.
# chown -R apache:apache
6. Finally, MediaWIki requires MySQL user and database, so let’s create them by executing the following commands:
# echo "CREATE DATABASE wikidb;" | mysql -u root -p # echo "CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'PASSWORD_HERE';" | mysql -u root -p # echo "GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';" | mysql -u root -p # echo "FLUSH PRIVILEGES;" | mysql -u root -p
Congratulations!
# nano /var/www/html/wiki/LocalSettings.php
Paste the code and save the file. That’s all.
Finally, in case you liked this post, please share it with your friends or leave a reply below. Thanks.
Thanks this site and the steps helping greatly……