Postgresql Setup - rubyists/tiny_call_center GitHub Wiki
PostgreSQL Setup on Arch Linux
Prerequisites
- yaourt, or the AUR helper of your choice, examples will use yaourt.
- Arch Linux install
- Sudo installed and configured to allow youruser access
Update
<youruser@yourhost ~>$ yaourt -Syu --aur
Install PostgreSQL
<youruser@yourhost ~>$ yaourt -S postgresql
Install the PG Gem
<youruser@yourhost ~>$ rvm use 1.9.2
<youruser@yourhost ~>$ gem i pg
Start PostgreSQL (we normally run it supervised, see [PostgreSQL-Supervision] for details):
/etc/rc.d/postgresql start
Create the callcenter database role, and database:
<youruser@yourhost ~>$ createuser -U postgres -P callcenter
Create the db
<youruser@yourhost ~>$ createdb -U postgres -O tcc
Adjust TCC_DB in your local environment
<youruser@yourhost ~>$ vim ~/.tccenv/TCC\_DB
<youruser@yourhost ~>$ cat ~/.tccenv/TCC\_DB
postgres://callcenter@localhost/tiny_call_center
This should be the URI to the database created in the last step
ODBC Setup
/etc/odbc.ini
[CallCenter]
Description=Test to Callcenter
Driver=PostgreSQL
Trace=Yes
TraceFile=sql.log
Database=callcenter
Servername=localhost
UserName=callcenter
Password=the_db_password
Port=5432
Protocol=6.4
ReadOnly=No
RowVersioning=No
ShowSystemTables=No
ShowOidColumn=No
FakeOidIndex=No
ConnSettings=
/etc/odbcinst.ini
[PostgreSQL]
Description=PostgreSQL driver for Linux & Win32
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/psqlodbcw.so
UsageCount=1
Continue with Runit-Setup at Set up Databases