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.2 -r1.21.2.3 --- openacs-4/packages/acs-core-docs/www/postgres.html 21 Nov 2003 11:14:09 -0000 1.21.2.2 +++ openacs-4/packages/acs-core-docs/www/postgres.html 8 Dec 2003 15:41:18 -0000 1.21.2.3 @@ -1,13 +1,13 @@ -
by Vinod Kurup
+by Vinod Kurup
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -Skip this section if you will run only Oracle.
OpenACS 5.0.0b2 will run with PostGreSQL 7.2.x, 7.3.2, +
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.
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 su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1"
and proceed to Tune postgres. (OPTIONAL) or to the - next section.
Using the Red Hat RPM.�Red Hat users: If you install PostGreSQL 7.3.2 from the Red Hat 9 RPM, you + next section.
Using the Red Hat RPM.�Red Hat users: If you install PostgreSQL 7.3.2 from the Red Hat 9 RPM, you
can skip a few steps. These shell commands add some links for compatibility with the directories from a source-based install; start the service; create a new group for web service
users, and modify the postgres user's
environment (more
@@ -30,7 +30,7 @@
echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
groupadd web
-su - postgres ... and then skip to 6. Something similar may work for other binary packages as well.
Unpack PostGreSQL.�If you have not downloaded the postgresql tarball to +su - postgres
... and then skip to 6. Something similar may work for other binary packages as well.
Unpack PostgreSQL.�If you have not downloaded the postgresql tarball to /tmp/postgresql-7.3.4.tar.gz, get it.
[root@yourserver root]# cd /usr/local/src [root@yourserver src]# tar xzf /tmp/postgresql-7.3.4.tar.gz @@ -67,7 +67,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@yourserver src]# su - postgres [postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.3.4 [postgres@yourserver postgresql-7.3.4]$ ./configure @@ -164,11 +164,11 @@ state. Red Hat and Debian and SuSE each work a little differently.
Red Hat RPM:
The init script is already installed; just turn it on for the appropriate run levels.
[root@yourserver root]# chkconfig --level 345 postgresql on -[root@yourserver root]#Red Hat from source:
[root@yourserver src]# cp /tmp/openacs-5.0.0b2/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql +[root@yourserver root]#Red Hat from source:
[root@yourserver src]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql [root@yourserver src]# chown root.root /etc/rc.d/init.d/postgresql [root@yourserver src]# chmod 755 /etc/rc.d/init.d/postgresql [root@yourserver src]# -cp /tmp/openacs-5.0.0b2/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql +
cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql chown root.root /etc/rc.d/init.d/postgresql chmod 755 /etc/rc.d/init.d/postgresql
Test the script.
[root@yourserver root]# service postgresql stop Stopping PostgreSQL: ok @@ -187,11 +187,11 @@chkconfig --add postgresql chkconfig --level 345 postgresql on chkconfig --list postgresql -service postgresql start
Debian:
root:~# cp /tmp/openacs-5.0.0b2/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql +service postgresql startDebian:
root:~# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql root:~# chown root.root /etc/init.d/postgresql root:~# chmod 755 /etc/init.d/postgresql root:~#-cp /tmp/openacs-5.0.0b2/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql +cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql chown root.root /etc/init.d/postgresql chmod 755 /etc/init.d/postgresql
Test the script
root:~# /etc/init.d/postgresql stop Stopping PostgreSQL: ok @@ -219,7 +219,7 @@ rc.d/ part in each of the following commands. -root:~# cp /tmp/openacs-5.0.0b2/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql +
root:~# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql root:~# chown root.root /etc/rc.d/init.d/postgresql root:~# chmod 755 /etc/rc.d/init.d/postgresql
@@ -261,12 +261,12 @@ start on runlevel 2 unless you alter the above commands a little. This usually isn't a problem as Red Hat defaults to runlevel 3) -
Tune postgres. (OPTIONAL).�The default values for PostGreSQL are very conservative; we can safely change some of them and improve performance.
Change the kernel parameter for maximum shared memory +
Tune postgres. (OPTIONAL).�The default values for PostgreSQL are very conservative; we can safely change some of them and improve performance.
Change the kernel parameter for maximum shared memory segment size to 128Mb:
[root@yourserver root]# echo 134217728 >/proc/sys/kernel/shmmax [root@yourserver root]#
Make that change permanent by editing /etc/sysctl.conf to add these lines at the end:
# increase shared memory limit for postgres -kernel.shmmax = 134217728
Edit the PostGreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information)
# Shared Memory Size +kernel.shmmax = 134217728
Edit the PostgreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information)
# Shared Memory Size # shared_buffers = 15200 # 2*max_connections, min 16 @@ -278,7 +278,7 @@ # Write-ahead log (WAL) # checkpoint_segments = 3 # in logfile segments (16MB each), min 1 -
Restart postgres (service postgres restart) so that the changes take effect.
+
Restart postgres (service postgresql restart) so that the changes take effect.