From Quentin's wiki


Linux (Debian 8 with apache 2)

Sources: - Installation, - Preventing Access, - SyntaxHighlight

  • Install the files and their dependencies
    cd /tmp/
    cd /var/www/html/
    tar xvzf /tmp/mediawiki-1.30.0.tar.gz
    mv mediawiki-1.30.0 w
    rm /tmp/mediawiki-1.30.0.tar.gz
    apt-get install php5-apcu php5-intl
  • Launch MySQL
    mysql -u root -p
  • Create the wiki user and the database with MySQL
    CREATE USER 'new_mysql_user'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED';
    use wiki;
    GRANT ALL ON wiki.* TO new_mysql_user@localhost;
  • Configure the maximum size you can upload to your wiki by editing the file /etc/php5/apache2/php.ini :
    upload_max_filesize = 5M
    memory_limit = 128M
  • Prevent the spam by blocking new registrations (if it is a personal wiki) and blocking the modification of the pages by another user than the admin. In this purpose change the file /var/www/html/w/LocalSettings.php
    # Prevent new user registrations except by sysops
    $wgGroupPermissions['*']['createaccount'] = false;
    # Restrict editing pages by all non-sysops users
    $wgGroupPermissions['*']['edit'] = false;
    $wgGroupPermissions['user']['edit'] = false;
    $wgGroupPermissions['sysop']['edit'] = true;
  • Add the extension for code visualisation on the wiki pages. Start by downloading, extracting and moving the file
    cd /tmp/
    tar -xzf SyntaxHighlight_GeSHi-REL1_30-87392f1.tar.gz -C /var/www/html/w/extensions
  • Activate the extension by adding the following line to /var/www/html/w/LocalSettings.php
    wfLoadExtension( 'SyntaxHighlight_GeSHi' );
  • Restart the server
    service apache2 restart
  • Go the wiki page ip_address/w on a navigator and proceed to install
  • You can change the skin of the wiki, per example Chameleon which is the skin of this wiki