====== MediaWiki Installation ====== This guide will explain how to get up and running with MediaWiki on LiteSpeed Web Server. ===== Install PHP modules ===== The easiest way to install PHP for LiteSpeed is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow [[http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:rpm | this guide]] to install and enable the LiteSpeed Repository. ===Step 1.Install PHP=== You can install some of the most commonly-used PHP 7.1 packages and modules for LiteSpeed. Use the following command: sudo yum install lsphp71 lsphp71-mysqlnd lsphp71-common lsphp71-gd lsphp71-pdo lsphp71-process lsphp71-mbstring lsphp71-mcrypt lsphp71-opcache lsphp71-bcmath lsphp71-xml lsphp71-soap lsphp71-json -y ===Step 2.Setup PHP=== Visit ''http://your_server_IP:7080''. Navigate to **Server Configuration > External app**, then click the second icon **Edit** on the right hand side in order to edit this application.\\ Modify: * **Name**: lsphp -> ''lsphp71'' * **Command**: $SERVER_ROOT/fcgi-bin/lsphp5 -> ''$SERVER_ROOT/lsphp71/bin/lsphp'' ===Step 3.Restart LSWS=== When you are finished, click the **Save** icon to save your changes, then click the **Graceful Restart** button. ===Step 4. PHP Verification=== Visit ''http://your_server_IP/phpinfo.php'' and make sure **PHP Version** shows ''7.1.x''. =====MariaDB Installation:===== Install MariaDB: sudo yum install mariadb-server sudo systemctl start mariadb Set new password: /usr/bin/mysql_secure_installation Enter ''$yourpassword'' =====Create MediaWiki DB Account ===== Create the MediaWiki database and your MediaWiki user/password: mysql -u root -p$yourmysqlpassword create database mediawiki; grant all privileges on mediawiki.* to mediawiki@localhost identified by 'mediawiki'; exit; Note: For security purposes, you should use a MediaWiki username and password that are different than our example. ===== Set Index File ===== An index file needs to be set in LiteSpeed Web Admin console. Navigate to **Virtual Hosts > Select Virtual Host from List > General > Index Files**, click **Edit** on top right corner, and enter **index.html,index.php** in the **Index Files** box. {{ :litespeed_wiki:installation:selection_010.png?600 |}} ===== Download and Extract MediaWiki ===== To illustrate setting up MediaWiki on a vhost we'll use the default virtual host, “Example”. You can download MediaWiki from their official [[https://www.mediawiki.org/wiki/Download|download page]]. Please note that document root of 'Example' virtual host is **/usr/local/lsws/Example/http/** tar zxf mediawiki-x.xx.x.tar.gz mv mediawiki-x.xx.x/* . ===== MediaWiki Installation ===== Open browser with URL ''http://server_IP:8088/mw-config/index.php'' This will start the MediaWiki web installer and it will look something like this: {{ :litespeed_wiki:installation:mediawiki-first.png?600 |}} ==== Language Selection ==== Select your preferred language and click **Continue**. ==== Environmental checks ==== {{ :litespeed_wiki:installation:mediawiki-requirments-checks.png?600 |}} This window will make sure that server-side requirments are met. If it says ''The environment has been checked. You can install MediaWiki'', you are good to go. ==== Connect to database ==== {{ :litespeed_wiki:installation:mediawiki-mysql-connection.png?600 |}} We've already created the database above. Just enter the database details so that MediaWiki can communicate with the database. Database settings: {{ :litespeed_wiki:installation:mediawiki-database-settings.png?600 |}} * **Storage engine**: ''InnoDB'' * **Database character set**: ''UTF-8'' ==== Setup Administrator Account ==== {{ :litespeed_wiki:installation:mediawiki-account.png?600 |}} Example configuration: * **Name of wiki**: ''Litespeedtech'' * **Your username**: ''litespeedtech'' * **Password**: ''litespeed'' * **Email address**: ''example@example.com'' ==== Options ==== On the options page, keep all of the default settings and click **Continue**. ==== Install ==== {{ :litespeed_wiki:installation:mediawiki-install.png?600 |}} Click **Continue** to start the installation. After installation is complete a file named ''LocalSettings.php'' will be automatically downloaded. You can upload this file at ''/usr/local/lsws/Example/http/''. After copying this file, installation is successfully completed. You can now browse MediaWiki at: ''http://server_IP:8088/''