Robert Lor's Weblog
Setting up MediaWiki with PostgreSQL 8.3
Setting up MediaWiki (I use version 1.13.1) with PostgreSQL 8.3 is quite straightforward. Thanks to Greg Mullane for fixing the issues.
Since tsearch2 is integrated into core in 8.3, you only need to run the following three commands before running the MediaWiki install script.
$ createuser -S -D -R -P -E wikiuser
$ createdb -O wikiuser wikidb
$ createlang plpgsql wikidb
With 8.2, you have to run the following commands in addition to the above.
$ psql wikidb < /usr/postgres/8.2/share/contrib/tsearch2.sql (path for PostgreSQL on Solaris)
$ psql -d wikidb -c "grant select on pg_ts_cfg to wikiuser;"
$ psql -d wikidb -c "grant select on pg_ts_cfgmap 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;"
$ psql -d wikidb -c "update pg_ts_cfg set locale = current_setting('lc_collate') where ts_name = 'default';"
If you need to upgrade to PostgreSQL 8.3 from an older version of PostgreSQL, you may find the following links useful.
http://www.mediawiki.org/wiki/Manual:Upgrading_Postgres
http://julien.danjou.info/blog/index.php/post/2008/05/19/Upgrading-mediawiki-from-PostgreSQL-82-to-83
Posted at 08:55PM Sep 30, 2008 by Robert Lor in PostgreSQL | Comments[2]
I'm not a computer expert could you please elaborate:
Do you have to be root to run the three command? What about permissions?
Thanks.
Posted by fred on October 01, 2008 at 11:49 PM CDT #
All postgres admin commands must be run as the postgres user (su - postgres). You must be root to run the su command. After that run the commands above.
Posted by 91.184.213.213 on October 02, 2008 at 02:43 AM CDT #