Search This Blog

Thursday, December 15, 2016

How-To install MediaWiki on Ubuntu 12.04 server


About MediaWiki

MediaWiki is a free open source wiki program that allows users to create their own personal wiki sites. Originally built for Wikpedia, MediaWiki is written in PHP and uses a backend database, like MySQL, to store its data.

Install pre-requisites


malaa@ubuntu:~$ sudo apt-get install tasksel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
tasksel is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.
malaa@ubuntu:~$ 

malaa@ubuntu:~$ sudo tasksel install lamp-server

Package configuration




        ┌─────────────────────────────────────────┤ Co│ While not mandatory, it is highly recommended that you set a password for the MySQL administrative "root" user.  │────│──────┐                                                                                             │
        │ If this field is left blank, the password will not be changed.                                                   │
        │                                                                                                                  │
        │ New password for the MySQL "root" user:                                                                          │
        │                                                                                                                  │
        â”********__________________________________________________________________________________________________________ │
        │                                                                                                                  │
        │                                                    <Ok>k>                                                        │
        │                                                                                                                  │
        └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘



                                                                                                                                   
Package configuration



                                          ┌──────┤ Configuring mysql-server-5.5 ├───────┐
                                          │                                             │
                                          │                                             │
                                          │ Repeat password for the MySQL "root" user:  │
                                          │                                             │
                                          â”********_____________________________________ │
                                          │                                             │
                                          │                 <Ok>k>                      │
                                          │                                             │
                                          └─────────────────────────────────────────────┘


Install MediaWiki

malaa@ubuntu:~$ sudo apt-get install mediawiki
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  php5
Suggested packages:
  imagemagick php5-gd mediawiki-math memcached clamav
The following NEW packages will be installed:
  mediawiki php5
0 upgraded, 2 newly installed, 0 to remove and 137 not upgraded.
Need to get 11.6 MB of archives.
After this operation, 42.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5 all 5.3.10-1ubuntu3.25 [1,080 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ pre


malaa@ubuntu:~$ sudo apt-get install imagemagick mediawiki-math php5-gd
[sudo] password for malaa: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cmap-adobe-japan1 doc-base fontconfig fontconfig-config
  gettext ghostscript gs-cjk-resource gsfonts
  imagemagick-common intltool-debian ko.tex-extra-hlfont


Web interface

MediaWiki 1.15.5-7 Installation

Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.
Checking environment...

Please include all of the lines below when reporting installation problems.
PHP 5.3.10-1ubuntu3.25 installed
Found database drivers for: MySQL
PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
Have XML / Latin1-UTF-8 conversion support.
Session save path (/var/lib/php5) appears to be valid.
PHP's memory_limit is 128M.
Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
Found GNU diff3: /usr/bin/diff3.
Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
Found GD graphics library built-in.
Installation directory: /var/lib/mediawiki
Script URI path: /mediawiki
Installing MediaWiki with php file extensions
Environment checked. You can install MediaWiki.


Generating configuration file...
Database type: MySQL
Loading class: DatabaseMysql
Attempting to connect to database server as root...success.
Connected to mysql 5.5.53-0ubuntu0.12.04.1; enabling MySQL 4.1/5.0 charset mode
Attempting to create database...
Created database wikidb
Creating tables... done.
Initializing statistics...
Granting user permissions to wikiuser on wikidb...success.
Created sysop account malaa.
Creating LocalSettings.php...
Installation successful! Move /var/lib/mediawiki/config/LocalSettings.php to /etc/mediawiki, then follow this link to your wiki.
You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.

Linux Basics - Set A Static IP On Ubuntu

Step 1: Configure the network interface

In this step you will manually configure your network interface by editing the following files using your preferred text editor(nano gedit vi). For the purpose of this example I am using the "nano" editor. You can edit the appropriate file by entering the following command into the terminal: You can copy and paste directly from this line. sudo nano /etc/network/interfaces
Enter your root password, once your prefered editor opens the file you can see...
auto lo eth0
iface lo inet loopback
iface eth0 inet dynamic

If you have more than one network card, please be sure to make changes to the correct network interface.
Statically configured network cards will have a section like:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx(enter your ip here)
        netmask xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx(enter gateway ip here,usually the address of the router)

If you use "nano" editor, type Ctrl+x to save changes.
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
<---Type "y"
File Name to Write: interfaces
<---ENTER


Here is an example:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
 address 192.168.1.101
 netmask 255.255.255.0
 gateway 192.168.1.1

Step 2: Configure the DNS servers

Changes in /etc/resolv.conf are required only on Systems with Ubuntu < 14.04, for newer Ubuntu versions the nameservers get configured in the /etc/network/interfaces file .

a) Ubuntu versions < 14.04

In this step you will manually configure your dns configuration file. sudo nano /etc/resolv.conf
Once your editor opens the file you want to enter the following information...
nameserver xxx.xxx.xxx.xxx(enter your dns server ip) nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)
If you use "nano" editor, type Ctrl+x to save changes. Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? <---Type "y" File Name to Write: resolv.conf <---ENTER
Here is an example:
nameserver 8.8.8.8 nameserver 8.8.4.4

b) Ubuntu versions > 14.04

Open the /etc/network/interfaces file again and add a line dns-nameservers 8.8.8.8 right after the gateway line. sudo nano /etc/network/interfaces
 

auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx(enter your ip here)
        netmask xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx(enter gateway ip here,usually the address of the router)
        dns-nameservers 8.8.8.8

<pre> 


The nameservers 8.8.8.8 and 8.8.4.4 are provided by Google for public use, so you can use them in your network configuration.

If you use "nano" editor, type Ctrl+x to save changes.
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
<---Type "y"
File Name to Write: interfaces
<---ENTER

Step 3: Restart networking

Manually restart your network interface with the new settings. For Ubuntu < 14.04 use the networking init script:
 

sudo /etc/init.d/networking restart

This should return a result that looks like the following:
*Reconfiguring network interfaces… [OK]


For Ubuntu versions > 14.04 use systemctl instead: systemctl restart ifup@eth0
At this point you can check if the settings are correct:
 

ifconfig

If everything is correct you will get this result.
eth0      Link encap:Ethernet  direcciónHW 00:33:27:46:2v:34
          Direc. inet:192.168.1.101  Difus.:0.0.0.0  Másc:255.255.255.0

Free CCNA Data Center Video Training at Cisco Learning Network


Cisco Learning Network is offering CCNA Data Center Video Training in free

Most of the sessions were ran by Robert Burns which is CCIE Data Center

Below are access details:


https://learningnetwork.cisco.com/docs/DOC-17214