Guide to Creating A Multi-User Setup of xTuple Postbooks and PostgreSQL on OSX
Notes For Installing PostgreSQL and xTuple Postbooks
Enabling xTuple and PostgreSQL
Donwload PostgreSQL, DO NOT INSTALL
Create sysctl.conf file in /etc with these contents:
kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048
Reboot
Run sysctl -a in terminal, look for above lines to make sure it picked up the changes.
Install PostgreSQL, remember postgres user password, use port 5433, NOT 5432.
Install Pgadmin.
Use this site as a guide for configuring PostgreSQL for use with xTuple, scroll down to “Using pgadmin to get started” section: http://www.xtuple.org/InstallingTheDatabase#UsingpgAdminToGetStarted
Remember server is on port 5433, not 5432.
.backup files for restoring databases are located here: http://sourceforge.net/projects/postbooks/files/
Install xTuple using installer. Should be able to connect to server:localhost database:whatever-you-called-it-on port:5433 with username:admin and password:admin. Make sure this works.
Enabling Multiuser Enviroment
Download and install Server Admin Tools for Mac OS X from here: http://support.apple.com/downloads/Server_Admin_Tools_10_6
Open up the workgroup manager. Use server:localhost and your login credentials at prompt.
There should be two accounts listed: “your username” and “postgres” or something similar to postgres.
If second account is not named postgres, is PostgreSQL for example, change to postgres. Then check box for can access account.
Next open System Preferences, go to Accounts, login options. Set automatic login to off.
Log Out.
Log in as user:postgres, and password:whatever-you-set-postres-password-as-in-PostgreSQL-setup.
Once logged in as postgres, open up finder and go to /library/postgresql/8.4/data.
Open pg_hba.conf
For each machine you want to be able to access the database put in a line under IPv4.
Should look like “host all all 192.168.1.1/24 md5” Always put the /24. IP address needs to be IP of computer that will be connecting to database.
Save edits to pg_hba.conf and open up postgresql.conf.
Make sure in field “listen_addresses” value is * not localhost. If localhost change to *.
Save and exit.
You should now be able to login to xTuple as username:admin password:admin from a computer with one of the IP’s specified in pg_hba.conf.
Enabling Multiple Login Roles
To enable multiple login roles log out of user:postgre and back into original account.
Open up pgadmin.
Right click on login roles, select create new.
Give name, password, and whatever privileges you want the role to have. Make sure role is a member of the xtrole group created in initial setup of PostgreSQL and xTuple.
Open up xTuple, and login with admin:admin. You WILL NOT be able to login with role you just created in pgadmin.
Go to System, and then maintain users. Select new. Give user same username and password of role you just created in pgadmin. Give whatever permissions you want.
Create new user.
Select show inactive users. User you just created should show up as inactive.
Select user and click edit.
Check box for user is active.
User should now display as active in user list.
You should now be able to login to xTuple with username:whatever-your-new-role-was and the password you selected for it from any of the IP addresses that you specified in pg_hba.conf.

