Saturday, September 13, 2014

MediaWiki a wonderful CMS: Get the TurnKey appliance to use PostgreSQL

To configure the TurnKey appliance

http://www.turnkeylinux.org/mediawiki

to use PostgreSQL as the database backend, take this script as a reference:

apt-get install postgresql php5-pgsql
dpkg-reconfigure locales
createuser -S -D -R -P -E wikiuser
createdb -O wikiuser --locale=es_MX.UTF-8 --template=template0 wikidb
psql -d wikidb -c "grant select on pg_ts_config to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_config_map to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_dict to wikiuser;"
psql -d wikidb -c "grant select on pg_ts_parser to wikiuser;"
mv /var/www/config/LocalSettings.php /var/www/config/LocalSettings.php.original
php /usr/share/mediawiki/maintenance/install.php --dbname=wikidb --dbtype=postgres --dbuser=wikiuser --dbpass=yourdbpass --dbport=5432 --server=http://192.168.122.92 --scriptpath='' --pass=wikipass --lang=es yourwikiname admin
service apache2 restart