1 This is the source for **xonstatdb**, the [Xonotic][xonotic] [Statistics database][xonstat].
2 All code herein is intended for the PostgreSQL database management server.
6 To build, first create the user that will own all of the objects in the database.
7 You must run this as an administrator user in your cluster.
8 See your operating system's guidelines for how this is set up on your system.
10 create user xonstat with password 'xonstat';
12 *Note: please change this password*
14 Or from the commandline:
16 # su - postgres (as root)
17 postgres$ createuser -P xonstat (this will prompt you for the users password)
19 Next, create the database itself:
24 CREATE DATABASE xonstatdb
31 Next, as your regular system user, log into the newly created database
32 using the user account you just created.
33 Do this from the root directory of your project checkout.
35 $ psql -U xonstat xonstatdb
37 You might need to force postgres to not use ident, if you get an error
38 like *Peer authentication failed for user "xonstat"*:
40 $ psql -h localhost -U xonstat xonstatdb
42 Create the schema in which all of the xonstat tables will reside:
47 AUTHORIZATION xonstat;
49 Create the pgplsql language, if it doesn't exist:
51 CREATE LANGUAGE plpgsql;
53 Now load the initial tables:
55 \i build/build_full.sql
57 *Note: You will see a lot of NOTICE messages. This is normal.*
61 [xonotic]: http://www.xonotic.org/
62 [xonstat]: http://stats.xonotic.org/
66 Project is licensed GPLv3.