To install MediaWiki on your localhost, you must setup apache and mysql first. We have already posted a tutorial on How to install and configure Apache,PHP,MySql and phpMyadmin on ubuntu. Please read first.
1.Download MediaWiki
Go to MediaWiki website and download the latest MediaWiki stable full version in .tar.gz format on your desktop and extract it. Now you will get mediawiki-1.16.2 folder. Here 1.16.2 is the version number of current stable release.Just rename that folder to mediawiki.
2.Copy mediawiki to /var/www folder
To do this Method 1:
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.
gksudo nautilus
Type your ubuntu password if needed. Just copy and paste the mediawiki folder from desktop to your /var/www folder.
OR
Method 2: Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.
cd Desktop
sudo mv mediawiki /var/www
Type your ubuntu password if needed.
3.Create a database using phpMyAdmin
follow these steps:
For phpmyadmin,apache,mysql,php installation click here
Open your browser and type http://localhost/phpmyadmin/ in the address bar and press enter. Type your mysql root username and password to login. choose a name for your mediawiki database,enter it in the Create new database field, and click Create.
4.Install and configure mediawiki
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.
sudo chmod 777 -R /var/www/mediawiki
Type your ubuntu password if needed.
Go to http://localhost/mediawiki/
Click setup the wiki
Type your site name,email,set language,Mediawiki admin username and password.Adjust your email setting.Set MySql as database and fill your Database host name,database name,mysql usename and password and leave other options in Database config.
Click Install Mediawiki button.After the successful installation Move the config/LocalSettings.php file to the parent directory.
To do this Method 1:
Go to Application -> Accessories -> Terminal. And type the below code in terminal and hit enter.
gksudo nautilus
Type your ubuntu password if needed.
Just cut and paste the LocalSettings.php file from /var/www/mediawiki/config folder to /var/www/mediawiki folder.
Go to http://localhost/mediawiki/index.php