{"id":17049,"date":"2015-04-16T15:13:44","date_gmt":"2015-04-16T20:13:44","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17049"},"modified":"2022-12-16T03:49:50","modified_gmt":"2022-12-16T09:49:50","slug":"install-mediawiki-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-mediawiki-on-a-centos-7-vps\/","title":{"rendered":"Install MediaWiki on a CentOS 7 VPS"},"content":{"rendered":"
In this article we will cover the steps needed to install MediaWiki on your CentOS 7 VPS<\/a>. MediaWiki is a free and open source wiki application. It is written in the PHP programming language and uses a backend database.<\/p>\n SERVER REQUIREMENTS<\/strong><\/p>\n Apache Web server If your server has a bare minimum CentOS 7 installation, you can install a LAMP (short for Linux, Apache, MySQL and PHP) stack by following our excellent tutorial<\/a>.<\/p>\n <\/p>\n UPDATE THE SYSTEM<\/strong><\/p>\n Log in to your Linux VPS<\/a> as user root and first of all make sure that all packages are up to date:<\/p>\n SETTING UP YOUR SERVER<\/strong><\/p>\n Once you have a working LAMP stack on your server, you will need to install a few additional PHP 5 modules which are required for MediaWiki to run. Enter the following command:<\/p>\n You can boost your MediaWiki performance by installing XCache. But first, you will need to install the EPEL repository. Execute:<\/p>\n Install XCache:<\/p>\n Restart Apache to finish the module installations:<\/p>\n DOWNLOAD AND INSTALL MEDIAWIKI<\/strong><\/p>\n We will navigate and download the latest version of MediaWiki to the \/var\/www\/html<\/em> directory which is Apache default document root. Of course you can change the location according to your needs. Enter the below commands to download, extract and move the installation to the \/var\/www\/html<\/em> directory:<\/p>\n CREATE A DATABASE<\/strong><\/p>\n Log in as root into MariaDB which is an enhanced, drop-in replacement for MySQL.<\/p>\n Create a database with the following commands:<\/p>\n With this step, you finished the work that needed to be done via the command line. Now, you need to finish the installation by opening your favorite web browser and navigate to: http:\/\/your_server_ip\/ .<\/p>\n Once welcomed by the first page, please select ‘set up the wiki<\/em>‘ which will start the installation.<\/p>\n Select a language on the first page and click continue. The next page will show and check your server environment. You should find the ‘The environment has been checked. You can install MediaWiki. Click Continue.<\/em>‘ line in the text which means that your MediaWiki installation can proceed.<\/p>\n In the following page, enter your MySQL settings.<\/p>\n Select MySQL (or compatible) for the database type. Type localhost for database host. The values for the database name, username and password will be the ones you created in the CREATE A DATABASE<\/strong> section above.<\/p>\n Leave the default values in the next screen.<\/p>\n Next, you will need to fill in the details of your wiki and create the admin user for it.<\/p>\n Once you have completed all the steps, you will be welcomed by the following page:<\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n <\/p>\n As you can see, you need to move a file called LocalSettings.php<\/em> to your server. If the download didn’t start automatically, you should download this file before closing the page.<\/p>\n Next, you will need to upload the file to \/var\/www\/html. You can do that via FTP, but to speed up the process, just open the downloaded file with a text editor, copy all the content from it and paste it to a new LocalSettings.php<\/em> file that you can create using the following command:<\/p>\n Congratulations, you have successfully installed MediaWiki on your CentOS 7 VPS<\/a>.<\/p>\n You can further customize your page by visiting the System administration page<\/a> for MediaWiki.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install MediaWiki for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS.<\/span> If you liked this post please share it with your friends on social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this article we will cover the steps needed to install MediaWiki on your CentOS 7 VPS. MediaWiki is a … <\/p>\n
\nPHP version 5
\nDatabase server (MySQL, PostgreSQL, or SQLite)<\/p>\n# yum -y update<\/pre>\n
# yum install php-xml php-intl php-gd texlive php-mysqli<\/pre>\n
# yum install epel-release<\/pre>\n
# yum install php-xcache<\/pre>\n
# systemctl restart httpd.service<\/pre>\n
# cd \/opt\r\n\r\n# curl -O http:\/\/releases.wikimedia.org\/mediawiki\/1.24\/mediawiki-1.24.2.tar.gz\r\n\r\n# tar xvzf mediawiki-*.tar.gz\r\n\r\n# mv mediawiki-1.24.2\/* \/var\/www\/html\/<\/pre>\n
# mysql -u root -p<\/pre>\n
MariaDB > create database mediawiki;\r\n\r\nMariaDB > grant all privileges on mediawiki.* to mwuser@localhost identified by 'your_password';\r\n\r\nMariaDB > > flush privileges;\r\n\r\nMariaDB > quit;<\/pre>\n
# touch \/var\/www\/html\/LocalSettings.php<\/pre>\n