HOWTO Install SimpleTicket with Postgresql on SUSE Linux

From Suntel Communications knowledgebase

Jump to: navigation, search

Here are the steps you need to follow to get SimpleTicket running on SUSE Linux (10.0 in my case) with a Postgresql backend:

Contents

Install SUSE Packages

Install the following SUSE rpms using YaST (or apt, yum, rug, redcarpet depending on which package management tool you use.. SUSE comes with them all)

postgresql
postgresql-server
ruby
ruby-devel
rubygems
subversion


Install Ruby Packages

gem install rails --include-dependencies
gem install feedtools --include-dependencies
gem install postgres-pr --include-dependencies

If you are running Linux (Probably the case if you are reading this HOWTO) and speed is important, then you can substitute 'postgres' for 'postgres-pr' in the line above to get the native driver. See the Ruby on Rail Postgresql page for more details

Get SimpleTicket

Postgresql support at present only exists in the suntel branch in the SimpleTicket Subversion repository. You can get it with the following command

svn co svn://project.simpleticket.net/branches/developers/suntel

Configure Postgresql

Create SimpleTicket User and DB

Firstly create a Database and user for SimpleTicket:

su - postgres
createuser tt -P
createdb tt --owner=tt
exit

Allow Access to SimpleTicket

Secondly edit your /var/lib/pgsql/data/pg_hba.conf file to allow MD5 authenticated access to the "tt" database.

The most specific way to do it is to simply add a line for tt to the top of the file that looks like:

host   tt          tt           127.0.0.1/32          md5

However I prefer a more general configuration like this:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   all         postgres                          ident sameuser
local   all         all                               md5
# IPv4 local connections:
host    all         postgres    127.0.0.1/32          ident sameuser
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         postgres    ::1/128               ident sameuser
host    all         all         ::1/128               md5

Populate SimpleTicket DB

cd suntel/stadmin
psql -U tt -P < db/TimeTicket.sql
psql -U tt -P < db/insert.sql

Configure SimpleTicket

Edit the 'password:' lines in 'config/database.yml' to match whatever you set for the Postgresql 'tt' user.

Start SimpleTicket

ruby script/server
Personal tools