Introduction
MediaWiki is a collaboration and documentation platform brought to you by a vibrant community.
It helps you collect and organize knowledge and make it available to people.
MediaWiki is a free and open source software that helps users collect and organize information. It is a centralized place where users collaborate and share knowledge. Wikipedia is an example of MediaWiki’s software use case, as it was initially developed for creating Wikipedia.
In this tutorial, We will show you how to install Mediawiki in your CentOS 8 system.
Installation
Just follow the steps below to get start with Mediawiki
- Update ur system and Repositories
dnf check-update && dnf clean all && dnf update -y
- Then install the LAMP stack on CentOS 8, You can install it by visiting this Link How to Install LAMP on CentOS 8
- After you finish the installation of LAMP, install php-intl as a required php package by MediaWiki.
dnf install php-intl -y
- Then create the MediaWiki Database with launching the MySQL command
mysql -u root -p
- Create the database and grant the privileges for the database and user.
CREATE DATABASE mediawiki_db;
GRANT ALL PRIVILEGES ON mediawiki_db.* TO 'mediawiki_user'@'localhost' IDENTIFIED BY 'unixcoppassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
\q
- Next step to download MediaWiki.
wget https://releases.wikimedia.org/mediawiki/1.37/mediawiki-core-1.37.0.tar.gz
NOTE: To install the Latest Version of MediaWiki, visit the Link below.
- Unarchive or extract the MediaWiki file
tar -zxpvf mediawiki-core-1.37.0.tar.gz
- Also move the MediaWiki to /var/www/html/mediawiki
mv mediawiki-1.37.0/ /var/www/html/mediawiki
- Set an appropriate ownership and permissions for MediaWiki directory
chown -R apache:apache /var/www/html/mediawiki/
chmod 755 /var/www/html/mediawiki/
- Then access MediaWiki with opening a web browser and input http://Server_IP_Address/mediawiki to access your MediaWiki.
![](http://unixcop.com/wp-content/uploads/2021/11/image-173.png)
- Then, click set up the wiki.
![](http://unixcop.com/wp-content/uploads/2021/11/image-174.png)
- Choose your language and click Continue.
![](http://unixcop.com/wp-content/uploads/2021/11/image-175.png)
- Proceed that your installation environmental check ensuring all prerequisites have been met by clicking Continue.
![](http://unixcop.com/wp-content/uploads/2021/11/image-176.png)
- Set the database, Input the MariaDB/MySQL database settings and click Continue.
![](http://unixcop.com/wp-content/uploads/2021/11/image-177.png)
- Use the same account as for installation then Click continue
![](http://unixcop.com/wp-content/uploads/2021/11/image-178.png)
![](http://unixcop.com/wp-content/uploads/2021/11/image-179.png)
- Set a name for your wiki and input login credentials and email address then Click Continue as shown above in the latest two screenshots.
![](http://unixcop.com/wp-content/uploads/2021/11/image-180.png)
- As shown in the screenshot above you will be directed to the latest installation page, here the installation will check that all is done, so click continue.
![](http://unixcop.com/wp-content/uploads/2021/11/image-181.png)
- Congrats, you have installed Mediawiki, but there is a last step to get start, is to download the LocalSettings.php file that contains all your Database configuration and put it into /var/www/html/mediawiki/ directory(the same directory that includes index.php).
- Then click on enter your wiki.
![](http://unixcop.com/wp-content/uploads/2021/11/image-182.png)
- MediaWiki is now ready for use.
Conclusion
In this tutorial, We have illustrated how to install and configure MediaWiki in CentOS 8, which is suitable for almost any purpose. Many websites run their own wikis on the web or intranets and in schools.
Thanks