howto:setting_up_a_postgresql_database_for_rts2
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | howto:setting_up_a_postgresql_database_for_rts2 [2011/12/08 13:50] – [How to set up a PostgreSQL database for RTS2] wildi | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to set up a PostgreSQL database for RTS2 ====== | ||
+ | * Install PostgreSQL server, on Debian something like | ||
+ | < | ||
+ | * Create database user - replace **user** with your username: | ||
+ | < | ||
+ | user@host: | ||
+ | [sudo] password for user: | ||
+ | postgres@host:/ | ||
+ | Shall the new role be a superuser? (y/n) y | ||
+ | USER CREATED | ||
+ | </ | ||
+ | * if necessary: ALTER USER user WITH PASSWORD ' | ||
+ | * Currently if you would like to run RTS2 services like **XML-RPCd** or **EXECUTOR**, | ||
+ | * As user postgres | ||
+ | < | ||
+ | </ | ||
+ | * Create RTS2 databases. Please see src/ | ||
+ | < | ||
+ | user@host: | ||
+ | user@host: | ||
+ | </ | ||
+ | * Add users to group observers in database stars: | ||
+ | < | ||
+ | user@host: | ||
+ | Welcome to psql 8.3.8, the PostgreSQL interactive terminal. | ||
+ | Type: \copyright for distribution terms | ||
+ | \h for help with SQL commands | ||
+ | \? for help with psql commands | ||
+ | \g or terminate with semicolon to execute query | ||
+ | \q to quit | ||
+ | stars=# alter group observers add user user; | ||
+ | GROUP ALTERED | ||
+ | stars=# | ||
+ | </ | ||
+ | * Check is database is up and running - run rts2-xmlrpcd in interactive mode: | ||
+ | < | ||
+ | user@host: | ||
+ | </ | ||
+ | |||
+ | If it will run and not complain about database, then you setup data properly. | ||
+ | |||
+ | ===== Setting up RTS2 users ===== | ||
+ | |||
+ | If you want to use external services, you will need to populate users table in stars database. Just a reminder: | ||
+ | |||
+ | * user and password in rts2.ini file refers to PostgreSQL user and password. They are not required if you setup root access for DB access, run PostgreSQL in local auth mode (most distributions run it this way as default) and run RTS2 services under root account (otherwise you will have to mess with permissions for /var/run, so that's most probably how you run RTS2 services) | ||
+ | * user and password from users table in the database are used for XML-RPC requests and XML-RPC web access ([[howto: | ||
+ | |||
+ | To populate user tables, do: | ||
+ | < | ||
+ | user@host: | ||
+ | Welcome to psql 8.3.8, the PostgreSQL interactive terminal. | ||
+ | Type: \copyright for distribution terms | ||
+ | \h for help with SQL commands | ||
+ | \? for help with psql commands | ||
+ | \g or terminate with semicolon to execute query | ||
+ | \q to quit | ||
+ | stars=# insert into users values (' | ||
+ | </ | ||
+ | |||
+ | Which will create user rts2, with password rts2. 1 is user ID, you of course would like to keep this unique, otherwise psql will complain. You can then user rts2 as login and rts2 as password for XML-RPC access through rts2-xmlrpcd |
howto/setting_up_a_postgresql_database_for_rts2.txt · Last modified: 2017/04/05 00:00 (external edit)