Ok,
Since yesterday and the new 9.1-RC3 version we are able to do new things with the jail / warden system…*One of the new things is being able to set some variable in the jail environment.
This allows a simple resolution of our problem…*
1. Update the host in order to allow him to have jails with raw sockets
1.a. Edit or create /etc/sysctl.conf and add the following :
|
Code:
|
# for postgresql jail
security.jail.allow_raw_sockets=1
kern.ipc.shmall=65536
kern.ipc.shmmax=134217728
kern.ipc.semmap=4096 |
1.b. Reboot the system
2. Create your jail using warden
2.a. Use the newly available "set" flag :
|
Code:
|
# warden set flags xxx.yyy.zzz.ttt allow.raw_sockets=true,allow.sysvipc=true |
Where x.y.z.t is the IP of your jail.
2.b. Log into the jail, compile / install postgres
|
Code:
|
# cd /usr/ports/databases/postgresql
# make install clean |
and then launch the initdb script :
|
Code:
|
# /usr/local/etc/rc.d/postgresql initdb |
Verify that everything is ok and running smoothly.
2.c. Add postgres to the rc.conf script of your jail :
|
Code:
|
postgresql_enable="YES" |
And that's It !