Installing MediaWiki

From Fyzix
Revision as of 10:41, 19 September 2014 by Fyzix (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


apt-get install -y php-apc php5-curl libcurl4-gnutls-dev libxml2 libxml2-dev php5-dev dh-make-php 
apt-get install -y fakeroot libicu-dev xsltproc php5-gd php-pear build-essential

Get Mediawiki

Latest Media Wiki:

cd /var/www
tar xvf mediawiki-1.23.3.tar.gz
mv mediawiki-1.23.3.tar.gz wiki
cd wiki
chmod 777 images

Create Database

Run MySQL administration

mysql -u root -p

Once inside mysql administration:

create database wikidb;
grant index, create, select, insert, update, delete, alter, lock tables on wikidb.* to 'wikiuser'@'localhost' identified by 'password';

Post Configuration

Point your browser to http://hostname_of_server/wiki/ or whatever you renamed the mediawiki directory to. Proceed with the installation process and install LocalSettings.php.


## The protocol and server name to use in fully-qualified URLs
$wgServer           = "";

This needs to be empty to accept any URL path. Otherwise mediawiki gets picky about the host name, which is not helpful if you have the wiki behind a VPN and publically accesible using a different FQDN.

Security with lighttpd

Edit /etc/lighttpd/lighttpd.conf

auth.require               = ( "/blah/" =>
                                 "method"  => "digest",
                                 "realm"   => "Authorized users only",
                                 "require" => "valid-user"
                               "/wiki/" =>
                                 "method"  => "digest",
                                 "realm"   => "wiki",
                                 "require" => "valid-user"


For security for the newly made zone do:

htdigest -c /etc/lighttpd/.auth 'Wiki' cheese

Other things to note

Logo location: /wiki/skins/common/images/wiki.png

Logo Icon location: /wiki/skins/common/images/logo.ico

Issue with debina-sys-maint


Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
root@Holland:/source# ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)