Let’s Talk Tech Episode 3 – Installing MediaWiki to Debian


Hello everyone! Welcome to Episode 3 of Let’s Talk Tech with Deep Core Data. Today, we’ll be installing MediaWiki on our Debian web server. As usual, we will be providing written instructions along with the video, so that reader who can’t hear the video, or are unable to get it to load, can follow along as well. Our webserver already has Apache web server and MySQL server installed on it from Episode 1 and Episode 2.

It has been a couple of weeks since they have been installed, so use apt-get to update the repositories, then upgrade any packages that need to be upgraded.

To update the repositories, type “sudo apt-get update”, and then hit enter.

To upgrade packages, type “sudo apt-get upgrade”, and then hit enter.

Once the server has been updated, install the packages that are absolutely required by MediaWiki. Apache2 and MySQL Server have been installed in previous episodes, but for anybody coming into the middle of this series, they have been included. PHP5, PHP5-MySQL, and libApache2-mod-php5 are all needed by MediaWiki.

To install the required packages, type “sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5” and then hit enter.

Next, install the optional packages. PHP-APC provides caching that will speed up the site. PHP5-INTL provides internationalized support for the site. ImageMagick will allow the wiki to automatically generate thumbnails for uploaded images. VSFTPD helps with users who want to upload files to the Wiki. PHP5-cli is used on the server to run upgrade scripts for MediaWiki.

To install the optional packages, type “sudo apt-get install php-apc php5-intl imagemagick vsftpd php5-cli” and hit enter.

Next, download and install the latest version of MediaWiki. As of this video, that’s version 1.26.

Step 1: Download MediaWiki by typing “wget https://releases.ikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz” and then hit enter.

Step 2: Extract the MediaWiki files to a local directory by typing “tar -xvzf mediawiki-1.26.2tar.gz” and then hit enter.

Step 3: Create a new mediawiki directory in var lib by typing “sudo mkdir /var/lib/mediawiki” and then hit enter.

Step 4: Move all of the mediawiki files in there by typing “sudo mv mediawiki-1.26.2/* /var/lib/mediawiki” and then hit enter.

Step 5:  Go to the var www html directory by typing “cd /var/www/html” and then hit enter. There, create a symbolic link to the mediawiki directory by typing “sudo ln -s /var/lib/mediawiki mediawiki” and hit enter.

At this point, the web server may need to be rebooted before it will recognize all the changes made.  In most cases, users can just proceed with the next step.

Open the MediaWiki site on the server, and a screen will pop up saying that the wiki needs to be configured; click on “setup the wiki.” Once the configuration screen has loaded, take the following steps:

Step 1: Set the language by selecting from a drop down menu, and then click continue.

Step 2: MediaWiki will do the environmental checks.  If a failure occurs here, check which packages were installed, and if necessary, restart the web server. If all the check clear, simply click continue.

Step 3: Connect to the database by filling out the requested information. Since the database used in this demonstration is the local web server, the database host is localhost. The database name and prefix can be left as the default. Finally, provide the password to the MySQL database, and click continue.

Step 4: Mediawiki will offer a number of database settings that can be adjusted according to individual requirements. For the purpose of this demonstration, the database settings have been left as the defaults. Once the settings have been configured, click ‘Continue’.

Step 5: Give the Wiki a name and create the Administrator account. After designating a username and password, provide an email address for password recovery.

Step 6: At this time, the option to finish the install now is available, however, there are a few optional settings that can also be configured. During the demonstration, a couple of these options are touched on, such as:

  • Who can edit the Wiki: Open wikis can be edited by anybody, Account creation lets anybody with an account edit the wiki, Authorized Editors must manually be given editting privileges, and a private wiki can’t be viewed by anyone without an approved account.
  • Copyright and Licensing: There are a number of licencing options available here, such as the Creative Commons license and the GNU Free Documentation Licence. By default, this is set to No Licence.

To configure the optional settings, click continue.

Step 7: After all the settings have been configured, a confirmation screen appears. Click continue to actually install the wiki.  This only takes a few seconds.

Step 8: When this is finished, click continue again, then the MediaWiki generates a LocalSettings.php file. Download this file to the local workstation, then upload it to the web server.

Step 9: Inside the web server, copy it to the var lib mediawiki directory by typing in “sudo mv ~/LocalSettings.php /var/lib/mediawiki” and hitting enter.

With the settings file in place, the wiki has been fully installed, and can now be accessed.

Thank you for watching Let’s Talk Tech with Deep Core Data. If you liked this video, found it helpful, or know someone who might find it interesting, please share it with your friends! Is there a system you would like to see covered by Deep Core Data? Is there something you feel would improve our video walk-throughs? Are you having trouble getting your server running? Let us know by leaving a comment below, or reach out to us on our Facebook, Twitter, or Google+ page.

About the Author:

Andrew is a technical writer for Deep Core Data. He has been writing creatively for 10 years, and has a strong background in graphic design. He enjoys reading blogs about the quirks and foibles of technology, gadgetry, and writing tips.

Leave A Comment