wiki.md 1.6 KB

Media Wiki

Debian / Ubuntu packages Download and install UI config with browser LocalSettings.php guide

Config

Tweak MediaWiki

File at /var/lib/mediawiki/LocalSettings.php

Look at postgresql tables

When logged as wiki_app, use command \\dt mediawiki.*

Warning

Do not use wiki in url filepath.

Install Media Wiki

PostgreSQL

sudo -u postgres psql

CREATE USER wiki_app WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD '52w7maa';

CREATE DATABASE wiki_db WITH OWNER wiki_app;

GNU/Linux packages

Minimal :

sudo apt install apache2 php libapache2-mod-php php-xml php-mbstring

Optimal :

sudo apt install php-apcu php-intl php-gd php-cli php-curl

If php-apcu : sudo service apache2 reload

Download

cd /tmp/

wget https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz

tar -xvzf /tmp/mediawiki-1.33.0.tar.gz

sudo mkdir /var/www/mediawiki

sudo mv mediawiki-*/* /var/www/mediawiki

Cli config

php maintenance/install.php

Apache HTTPS

todo

Optional : configure PHP

todo

Uninstall Mediawiki

Disable site

Required to disable database connection :

sudo a2dissite 'wiki.*'

sudo service apache2 reload

Drop postgreSQL stuff

As postgres user :

DROP DATABASE wiki_db ;

DROP ROLE wiki_app ;

Delete web server files

sudo rm -r /var/www/mediawiki