The MediaWiki helps you collect and organize knowledge and make it available to people. It’s powerful, multilingual, free and open, extensible, customizable, reliable, and free of charge. The MediaWiki software is used by tens of thousands of websites and thousands of companies and organizations.
aNow lets see how to instll MediaWiki on Centos 7:
So first we have to install LAMP (Linux, Apache, MySQL and PHP)
Installing LAMP on CentOS 7
First we need to enable the epel and remi repositories to install LAMP stack with the latest PHP 7.x version
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install epel-release
Next we are going to use php 7.3 And now we can proceed with installing Apache, MariaDB & PHP with necessary extensions required to run MediaWiki.
yum-config-manager --enable remi-php73
yum -y install httpd
yum -y install mariadb-server mariadb-client
yum install php php-mysql php-pdo php-gd php-mbstring php-xml php-intl texlive
So now we installed Httpd, php & mariadb so lets Start and enable the services with
systemctl start httpd
systemctl enable httpd
systemctl start mariadb
systemctl enable mariadb
Now Lets secure MariaDB installation by running
To make the changes active, We will have to restart the Apache web server by running
systemctl restart httpd
So LAMP installation is completed lets ,move to MediaWiki
Installing MediaWiki on CentOS 7
Next step is to download the MediaWiki package using wget command
Now we downloaded MediaWiki so lets extract the contents of the archive with the tar command.
tar xf mediawiki*.tar.gz
mv mediawiki-1.32.0/* /var/www/html/
Now we will create database for our Media Wiki installation as shown.
mysql -u root -p
On the MySQL prompt run the following commands to create database, create database user and grant that user privileges on the newly created database
CREATE DATABASE mediawiki;
CREATE USER 'mediawiki'@'localhost' identified by 'password';
GRANT ALL PRIVILEGES on media_wiki.* to 'media_wiki’@'localhost';
Now we can access the MediaWiki application by reaching http://ipaddress of your server and follow the installation steps
First we can choose the language settings
If The checks should be OK and we can proceed to the next page where you will setup the database details. For that purpose, use the database, user and password that you have created earlier:
On the next page we need to choose the database engine – InnoDB or Mylsam ,here I have used InnoDB. Finally we can give our wiki a name and create administrative username and password by filling the necessary fields.
Once you have filled the details click Continue.
On the next screens, you can leave the default settings, unless you want to make any other custom changes.
When we complete those steps, we will be provided with a file called LocalSettings.php. We have to place that file in the directory root for our Wiki. Alternatively we can copy the contents of the file and create the file again.
Now when you try to access
http://youripaddress you should see the newly installed MediaWiki: