Skip to content
Kevin Berry edited this page Mar 2, 2011 · 5 revisions

PostgreSQL Setup on Arch Linux

Prerequisites

Mandatory

  • 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 psqlodbc and unixodbc

<youruser@yourhost ~>$ yaourt -S unixodbc psqlodbc

Create odbcinst.ini, containing the following:

[PostgreSQL]
Description=PostgreSQL driver for Linux & Win32
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/psqlodbcw.so
UsageCount=1

** Create odbc.ini, containing the following: **

[CallCenter]
Description=Tiny Callcenter
Driver=PostgreSQL
Trace=Yes
TraceFile=callcenter_sql.log
Database=callcenter
Servername=localhost
UserName=callcenter
Password=yourpassword
Port=5432
Protocol=6.4
ReadOnly=No
RowVersioning=No
ShowSystemTables=No
ShowOidColumn=No
FakeOidIndex=No
ConnSettings=

** Start PostgreSQL (we normally run it supervised, see [PostgreSQL-Supervision] for details: **

/etc/rc.d/postgresql start

** Create the callcenter database role, and database: **

createuser -U postgres -P callcenter
createdb -U postgres -O callcenter                                                                                                                                                                                    

** Test your ODBC connection to the PostgreSQL DB using isql **

isql callcenter

Adjust TCC_DB in your local environment

% cat ~/.tccenv/TCC_DB           

postgres://callcenter@localhost/callcenter

Clone this wiki locally