Help:How To Set Up Mediawiki

From OpenLiteSpeed
Jump to: navigation, search

In the following article we will guide you through the steps to install MediaWiki, a popular content management system. Assume you have successfully installed openlitespeed and configured the virtual host.

Install MediaWiki

1. Install PHP

You can stip this step if you have installed PHP. Check MediaWiki installation requirement page for PHP requirement. If PHP is not installed, the easiest way to install PHP for OpenLiteSpeed is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to install and enable the LiteSpeed Repository.

Use the following command to install PHP with the modules required:

yum install lsphp55 lsphp55-common lsphp55-gd lsphp55-process lsphp55-mbstring lsphp55-mysql
Note: There are four versions of LSPHP (lsphp53, lsphp54, lsphp55, lsphp56) available.

Direct LSWS to the location of the installed PHP. (In this example, PHP 5.5 is installed by default in /usr/local/lsws/lsphp55/bin/lsphp. Change the value of the WebAdmin console > External App > your external application > Command setting to reflect that.)

If you are not using RedHat or CentOS, or you prefer to build PHP by yourself, see our instructions for building PHP for Mediawiki here.

2. Download MediaWiki (1.21.1 as of writing) into your virtual host document root: /usr/local/lsws/test1/html

cd /usr/local/lsws/test1/html
tar zxf mediawiki-1.21.1.tar.gz
mv mediawiki-1.21.1 mediawiki
rm mediawiki-1.21.1.tar.gz

3. Set up a MySQL database and user for MediaWiki.

yum install mysql mysql-server
service mysqld start
mysql -u adminusername -p
mysql> create database mediawiki
mysql> grant all privileges on mediawiki.* to db_user@'localhost' identified by 'password'

4. Graceful restart to apply changes. (Actions > Graceful Restart)

5. Point your browser to http://server_ip:8088/mediawiki/index.php to run the MediaWiki installer.

6. Once complete, installation will generate a file called LocalSettings.php. Save it to the directory "mediawiki/" in your virtual host's document root and make sure the web server user has read permission.

7. The newly installed mediawiki (http://server_ip:8088/mediawiki/) should be ready to use.