• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install MediaWiki in Ubuntu

{{postValue.id}}

To Install MediaWiki in Ubuntu

MediaWiki is a PHP wiki package designed for use on Wikipedia. It allows you to create your own personal wiki site. It is an extremely powerful and a featured wiki implementation, which also shows the data stored in a database. Installation of the MediaWiki in Ubuntu is explained in this article.

Installation of Mediawiki

Before installing mediawiki, you need to install LAMP server with following link,

https://www.linuxhelp.com/how-to-install-lamp-by-using-tasksel-tool-in-ubuntu/

Utilize the following command to install the PHP modules and dependency packages.

root@linuxhelp:/home/user1# apt-get install php5-intl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
..
..
Creating config file /etc/php5/mods-available/intl.ini with new version
php5_invoke: Enable module intl for cli SAPI
php5_invoke: Enable module intl for apache2 SAPI
Processing triggers for libapache2-mod-php5 (5.6.11+dfsg-1ubuntu3.4) ...
root@linuxhelp:/home/user1# apt-get install php5-gd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
&hellip 
&hellip 
php5_invoke: Enable module gd for cli SAPI
php5_invoke: Enable module gd for apache2 SAPI
Processing triggers for libapache2-mod-php5 (5.6.11+dfsg-1ubuntu3.4) ...

If you want to install texlive and php5-xcache packages then run the following command.

root@linuxhelp:/home/user1# apt-get install texlive php5-xcache

Restart the Apache web server to take effect.

root@linuxhelp:/home/user1# service apache2 restart

Now its time to download the mediawiki package.

root@linuxhelp:/home/user1# wget http://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz
--2016-11-23 13:46:11--  http://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz
Resolving releases.wikimedia.org (releases.wikimedia.org)... 91.198.174.217, 2620:0:862:ed1a::3:d
Connecting to releases.wikimedia.org (releases.wikimedia.org)|91.198.174.217|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz [following]
--2016-11-23 13:46:12--  https://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz
Connecting to releases.wikimedia.org (releases.wikimedia.org)|91.198.174.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20725572 (20M) [application/x-gzip]
Saving to: ‘ mediawiki-1.24.1.tar.gz’ 
mediawiki-1.24.1.tar.gz   100%[======================================> ]  19.76M   150KB/s   in 2m 22s 
2016-11-23 13:48:35 (143 KB/s) - ‘ mediawiki-1.24.1.tar.gz’  saved [20725572/20725572]

Immediately extract the downloaded package.

root@linuxhelp:/home/user1# tar -xvf mediawiki-1.24.1.tar.gz
mediawiki-1.24.1/
mediawiki-1.24.1/HISTORY
mediawiki-1.24.1/CREDITS
mediawiki-1.24.1/api.php
mediawiki-1.24.1/profileinfo.php5
&hellip 
&hellip 
mediawiki-1.24.1/skins/Modern/resources/images/footer-grad.png
mediawiki-1.24.1/skins/Modern/resources/images/bullet.gif
mediawiki-1.24.1/skins/Modern/resources/images/video.png
mediawiki-1.24.1/skins/Modern/resources/images/discussionitem_icon.gif
mediawiki-1.24.1/skins/Modern/resources/images/document.png

Move the extracted files to HTML directory.

root@linuxhelp:/home/user1# mv mediawiki-1.24.1/* /var/www/html

Once the files are moved, then create a database for mediawiki.

root@linuxhelp:/home/user1# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with   or g.
Your MariaDB connection id is 53
Server version: 10.0.25-MariaDB-0ubuntu0.15.10.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.
MariaDB [(none)]>  create database my_wiki 
Query OK, 1 row affected (0.06 sec)
MariaDB [(none)]>  GRANT INDEX, CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON my_wiki.* TO ' wiki' @' localhost'  IDENTIFIED BY ' password'  
Query OK, 0 rows affected (0.14 sec)
MariaDB [(none)]>  FLUSH PRIVILEGES 
Query OK, 0 rows affected (0.02 sec)
MariaDB [(none)]>  exit
Bye


Open the web browser and navigate to http://IP address/index.php. Mediawiki installer page will appears as shown below,

Mediawiki installer

Select your language.

 language

Then install the php5-mysql package with the ' ' apt-get' " command.

root@linuxhelp:/var/www/html# apt-get install php5-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  php5-mysql
&hellip 
&hellip 
Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
php5_invoke: Enable module pdo_mysql for cli SAPI
php5_invoke: Enable module pdo_mysql for apache2 SAPI
Processing triggers for libapache2-mod-php5 (5.6.11+dfsg-1ubuntu3.4) ...

Again restart the Apache web server to take effect.

root@linuxhelp:/home/user1# service apache2 restart

Refresh the web page to know that problem gets solved or not. Here problem is resolved.

continue

Enter the Database details.

 Database details.

Manage Database settings.

Manage

Enter your favorite name for the wiki and administrative account details.

administrative account details

Once the above process is completed, enable the file uploads and enter the Logo URL path.

Logo URL path.

Click on continue option to begin installation process.

 begin_installation

To continue the installation process, click on continue option.

Continue_installation

Download LocalSettings.php and click on OK option.

LocalSettings.php

Now copy the contents of LocalSettings.php into /var/www/html/LocalSettings.php

root@linuxhelp:/var/www/html# nano LocalSettings.php

Enter your wiki to view the mediawiki main page.

mediawiki _mainpage

mediawiki

Login with the user credentials.

Login

Upload files

Upload_files

Special page

Special page

Mediawiki preferences

Mediawiki preferences

Tags:
ethan
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

I want to import the Wiki I developed on WikiSpaces.com to MediaWiki. How to achieve it?

A

It depends on what information/tools do you have to export the wiki.

Q

How do I add extra namespaces in MediaWiki?

A

Do follow the link for installing Mediawiki https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#Creating_a_custom_namespace

Q

How will this affect other products that the Wikimedia Foundation is developing?

A

The research carried out will help bring more understanding to search and discovery mechanisms across all platforms, and user flows from readers to editors and will inform decisions made on h

Q

How do I enable embedded math formulas?

A

MediaWiki allows embedded math formulas.

Q

Is it possible to move my MediaWiki to a different machine?

A

Yes.you can move MediaWiki, In essence, you will be backing up your old installation and then "restoring" it onto the new machine.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Gibbson ?
How do i run both nginx and apache in same instance on centos

Hi...,

my server is based centos operating system and my webserver is already running on Apache.... i need to run both apache and nginx on same instance ... please help me to implement this concept...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.