Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.21.2.5 -r1.21.2.6 --- openacs-4/packages/acs-core-docs/www/postgres.html 16 Dec 2003 13:58:42 -0000 1.21.2.5 +++ openacs-4/packages/acs-core-docs/www/postgres.html 18 Dec 2003 10:04:26 -0000 1.21.2.6 @@ -1,8 +1,7 @@
Skip this section if you will run only Oracle.
OpenACS 5.0.0b4 will run with PostgreSQL 7.2.x, 7.3.2, - 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL.
Skip this section if you will run only Oracle.
OpenACS 5.0.0b4 will run with PostgreSQL 7.2.x, 7.3.2, 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL. PostgreSQL 7.4 has been verified.
Mac OS X.�If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.2.x or 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.
Debian users can install the package and add some backwards-compatibility links:
apt-get install postgresql postgresql-dev postgresql-doc ln -s /usr/include/postgresql/ /usr/include/pgsql ln -s /var/lib/postgres /usr/local/pgsql ln -s /usr/include/pgsql /usr/local/pgsql/include @@ -51,12 +50,17 @@ useradd -g web -d /usr/local/pgsql postgres mkdir -p /usr/local/pgsql chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4 -chmod 750 /usr/local/pgsql
Set up postgres's environment variables.�They are necessary for the executable to find its supporting - libraries. For convenience, we'll simply append the necessary - lines to the postgres shell config file.
[root src]# echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
-[root src]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
-echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
-echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
Test this by logging in as +chmod 750 /usr/local/pgsql
Mac OS X: Do instead:
sudo niutil -create / /groups/web +sudo niutil - list / /groups
The second command returns a list of groups. The last entry should include the gid of the group web, which you will need in the next sequence:
sudo niutil -create / /users/postgres
+sudo niutil -createprop / /users/postgres gid web's gid_number
+sudo niutil -createprop / /users/postgres home /usr/local/pgsql
+sudo niutil -createprop / /users/postgres shell /bin/bash
+mkdir -p /usr/local/pgsql
+chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4
+chmod 750 /usr/local/pgsql
Set up postgres's environment variables.�They are necessary for the executable to find its supporting + libraries. Put the following lines into the postgres user's environment.
[root src]# su - postgres +[postgres ~] emacs ~postgres/.bashrc
Paste these lines into .bashrc:
export PATH=$PATH:/usr/local/pgsql/bin +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
Test this by logging in as postgres and checking the paths; you should see /usr/local/pgsql/bin
[root src]# su - postgres [postgres pgsql]$ env | grep PATH @@ -67,7 +71,7 @@ Change to the postgres user and run ./configure to set the compilation options automatically. This is the point at which you can configure PostgreSQL in various ways. For example, if you want to enable - Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help. + Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.[root src]# su - postgres [postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4 [postgres postgresql-7.3.4]$ ./configure @@ -252,7 +256,9 @@root:/etc/rc.d/init.d # cd root:~ # /etc/rc.d/init.d/rc2.d/S20postgresql start Starting PostgreSQL: ok -root:~ #
+root:~ #
Mac OS X:
Install the startup script:
cd /Library/StartupItems/
+tar xfz /var/lib/aolserver/service0/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz
+
From now on, PostgreSQL should start automatically each time you boot up and it should shutdown gracefully each time you shut down. (Note: