[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When using PostgreSQL, a dedicated GGZ user and database has to be created. From PostgreSQL 7.3 on, the following commands should be used:
@verbatim psql template1 CREATE USER ggzd PASSWORD 'ggzd'; CREATE DATABASE ggz OWNER ggzd;
For versions below 7.3, things are more difficult, especially since the table cannot be created automatically. Thus, the following applies:
@verbatim psql template1 CREATE USER ggzd; CREATE DATABASE ggz; \q psql ggz CREATE TABLE users ( id serial NOT NULL, handle varchar(256) NOT NULL, password varchar(256), name varchar(256), email varchar(256), lastlogin int8, permissions int8 ); CREATE TABLE stats ( id serial NOT NULL, handle varchar(256) NOT NULL, game varchar(256) NOT NULL, wins int8, losses int8, ties int8, forfeits int8, rating double, ranking int8, highscore int8 ); CREATE TABLE control ( key varchar(256), value varchar(256) ); GRANT ALL ON users TO ggzd; GRANT ALL ON users_id_seq TO ggzd; GRANT ALL ON stats TO ggzd; GRANT ALL ON stats_id_seq TO ggzd; GRANT ALL ON control TO ggzd;
The control table is used internally by ggzd to detect upgrades. You can speed up the table with an index, like:
@verbatim CREATE index xhandle ON users (handle);
Make sure the connection can be established. When the database is running on a remote server, it must accept internet connections (startup option -i), and allow the remote access, which could be granted using the following entry in data/pg_hba.conf:
@verbatim host ggz 192.168.0.2 255.255.255.255 crypt
Please refer to the PostgreSQL documentation for tuning and security advice. The above information is only meant as a quick setup, not as complete documentation.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |