Difference between revisions of "How to Set Up a MediaWiki 1.23 Server on CentOS 6"

From steamWiki
Jump to: navigation, search
Line 1: Line 1:
#Setting up the OS
+
#Setting up the Linux OS
 
##Follow my guide for [[Setting Up a Secure CentOS 6 Server]]
 
##Follow my guide for [[Setting Up a Secure CentOS 6 Server]]
 
#Installing [https://www.mediawiki.org/ MediaWiki]
 
#Installing [https://www.mediawiki.org/ MediaWiki]
##Install Apache
+
##Install [https://httpd.apache.org/ Apache]
 
###run ''sudo yum install httpd'' to install apache and its dependencies
 
###run ''sudo yum install httpd'' to install apache and its dependencies
 
###run ''sudo chkconfig httpd on'' to make sure apache starts on boot
 
###run ''sudo chkconfig httpd on'' to make sure apache starts on boot
Line 11: Line 11:
 
###Visit the ip address of your server, preferably from a different computer, to ensure everything is working properly.  You should see something like this.
 
###Visit the ip address of your server, preferably from a different computer, to ensure everything is working properly.  You should see something like this.
 
###*[[File:Apache_2_Test.png|600px]]
 
###*[[File:Apache_2_Test.png|600px]]
##Install MySQL
+
##Install [https://www.mysql.com/ MySQL]
 
###run ''sudo yum install mysql-server'' to install the mysql server and its dependencies
 
###run ''sudo yum install mysql-server'' to install the mysql server and its dependencies
 
###run ''sudo chkconfig mysqld on'' to make sure that mysql starts on boot
 
###run ''sudo chkconfig mysqld on'' to make sure that mysql starts on boot
Line 23: Line 23:
 
####hit ''y'' and enter to remove the test database
 
####hit ''y'' and enter to remove the test database
 
####hit ''y'' and enter to reload the privilege table
 
####hit ''y'' and enter to reload the privilege table
##Install PHP
+
##Install [https://php.net/ PHP]
 
###run ''sudo yum install php php-mysql'' to install php, php-mysql, and dependencies
 
###run ''sudo yum install php php-mysql'' to install php, php-mysql, and dependencies
 
###run ''sudo vi /var/www/html/info.php'' to create and edit a new webpage & populate the file with the following:
 
###run ''sudo vi /var/www/html/info.php'' to create and edit a new webpage & populate the file with the following:
Line 33: Line 33:
 
###visit your server ip/info.php (ie: http://192.168.1.100/info.php) and it should look something like this:
 
###visit your server ip/info.php (ie: http://192.168.1.100/info.php) and it should look something like this:
 
###*[[File:PHP_5_Test.png|600px]]
 
###*[[File:PHP_5_Test.png|600px]]
 +
##Install [https://www.mediawiki.org/ Mediawiki]
 +
###If you don't already have it, install wget via ''sudo yum install wget''
 +
###Visit the [http://www.mediawiki.org/wiki/Download MediaWiki Download] page to find the latest version.  Substitute the path to the latest version in the next command if necessary
 +
###run ''wget https://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz'' to download the latest version of MediaWiki
 +
###run ''tar xvzf mediawiki-1.23.1.tar.gz'' to unpack the downloaded file
  
 
==References==
 
==References==
 
*https://www.digitalocean.com/community/tutorials/how-to-install-mediawiki-on-centos-6-4
 
*https://www.digitalocean.com/community/tutorials/how-to-install-mediawiki-on-centos-6-4
 
*https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
 
*https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6

Revision as of 08:03, 20 July 2014

  1. Setting up the Linux OS
    1. Follow my guide for Setting Up a Secure CentOS 6 Server
  2. Installing MediaWiki
    1. Install Apache
      1. run sudo yum install httpd to install apache and its dependencies
      2. run sudo chkconfig httpd on to make sure apache starts on boot
      3. Add the following lines to your /etc/sysconfig/iptables file to allow web traffic
        • # Accept web traffic.
        • -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
      4. restart to ensure the iptables are reloaded and check that apache is correctly started at boot
      5. Visit the ip address of your server, preferably from a different computer, to ensure everything is working properly. You should see something like this.
        • Apache 2 Test.png
    2. Install MySQL
      1. run sudo yum install mysql-server to install the mysql server and its dependencies
      2. run sudo chkconfig mysqld on to make sure that mysql starts on boot
      3. run sudo service mysqld start to start the mysql server
      4. run sudo mysql_secure_installation
        1. just hit enter for 'none' at the 1st password prompt
        2. hit y and enter to set a root password
        3. type in your new root-password and hit enter (twice)
        4. hit y and enter to remove the anonymous account
        5. hit y and enter to ensure that root can only login at the physical keyboard
        6. hit y and enter to remove the test database
        7. hit y and enter to reload the privilege table
    3. Install PHP
      1. run sudo yum install php php-mysql to install php, php-mysql, and dependencies
      2. run sudo vi /var/www/html/info.php to create and edit a new webpage & populate the file with the following:
        • <?php
        • phpinfo();
        • ?>
      3. save & exit
      4. run sudo service httpd restart to reload the apache server
      5. visit your server ip/info.php (ie: http://192.168.1.100/info.php) and it should look something like this:
        • PHP 5 Test.png
    4. Install Mediawiki
      1. If you don't already have it, install wget via sudo yum install wget
      2. Visit the MediaWiki Download page to find the latest version. Substitute the path to the latest version in the next command if necessary
      3. run wget https://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz to download the latest version of MediaWiki
      4. run tar xvzf mediawiki-1.23.1.tar.gz to unpack the downloaded file

References