An open source and free wiki program- MediaWikienables users to make theirpersonal wiki sites. It was basically developed for Wikpedia, but because of its high customization and scalability, it is now in use by a large number of other projects.
You require LAMP deployed on your server prior to starting work with MediaWiki.
Installing MediaWiki on your VPS
During the time of writing this guide, the most recent version available of MediaWiki is MediaWiki 1.21.In order to obtain the most recent version of this platform, visit their website and change the code simply for matching the most recent version.
- Download the most recent version of MediaWiki by going to its official website:
- Following completion of download, package should be untarred:
tar xvzf mediawiki-*.tar.gz
- The platform’s specified version is included in the downloaded contents’ default directory, so it is best to shift the contents to a better and more appropriate location:
sudo mv mediawiki-1.21.2 /etc/mediawiki
- A symbolic link needs to be created between the Apache’s document root and MediaWiki directory:
sudo ln -s /etc/mediawiki/ /var/www/html
- Restart Apache
sudo service apache2 restart
Creating a MySQL Database and User
The creation of MySQL database is easy and it enhances security, as it removes the requirement for sharing the root information of MySQL. Follow the steps given below:
- Log into MySQL
mysql -u root -p
- Develop a Dedicated Database
You can decide any name for your database that you like. Here**example_wiki** will be used.
create database example_wiki;
- Next grant the permissions
Now a new user needs to be provided for the novel database, which possesses all the permissions required by MediaWiki. Change “wikiuser” and “password” according to your specifications.
grant index, create, select, insert, update, delete, alter, lock tables on my_wiki.* to 'wikiuser'@'localhost' identified by 'password';
- Lastly, implement the changes and finish by quitting MySQL.
FLUSH PRIVILEGES; exit;
Setting Up MediaWiki
Now configuration of MediaWiki will be done by following the on-screen instructions on your browser.
On setup page’s “MySQL settings” section, leave localhostas the Database Host; type in the MySQL database name, username, and password that were setup in the preceding steps.
Go on pressing continue till you reach that page which says, “Complete!”
As soon as the LocalSettings.php file completes downloading, upload it to /etc/mediawiki or to whatever directory includes “index.php” file of MediaWikion your VPS.
You can utilize SCP (Secure Copy) for copying the LocalSettings.php file from your computer onto the server:
scp /path/to/LocalSettings.php [username]@[IP Address]:/etc/mediawiki
Once file upload finishes, you canavail your personal wiki at [domain]/mediawiki!