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.30.2.3 -r1.30.2.4 --- openacs-4/packages/acs-core-docs/www/postgres.html 5 Jul 2004 19:47:31 -0000 1.30.2.3 +++ openacs-4/packages/acs-core-docs/www/postgres.html 15 Oct 2004 07:35:40 -0000 1.30.2.4 @@ -1,7 +1,7 @@
Skip this section if you will run only Oracle.
OpenACS 5.1.1 will run with PostgreSQL 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.
Skip this section if you will run only Oracle.
OpenACS 5.1.1 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4 and 7.4.x. 7.4.5 is the recommended version of PostgreSQL.
Special notes for Mac OS X.�If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.
Debian users, especially Debian stable users, should install PostGreSQL from source as detailed below. Debian unstable users: the following process has been known to work (but you should double-check that the version of PostGreSQL is @@ -35,13 +35,13 @@ 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 8. Something similar may work for other binary packages as well.
Safe approach: install from source
Unpack PostgreSQL 7.3.4.�If you have not downloaded the postgresql tarball to - /tmp/postgresql-7.3.4.tar.gz, +su - postgres
... and then skip to 8. Something similar may work for other binary packages as well.
Safe approach: install from source
Unpack PostgreSQL 7.4.5.�If you have not downloaded the postgresql tarball to + /tmp/postgresql-7.4.5.tar.gz, get it.
[root root]# cd /usr/local/src
-[root src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
+[root src]# tar xzf /tmp/postgresql-7.4.5.tar.gz
[root src]#
cd /usr/local/src
-tar xzf /tmp/postgresql-7.3.4.tar.gz
ALTERNATIVE: Unpack PostgreSQL 7.4.1.�If you have not downloaded the postgresql tarball to +tar xzf /tmp/postgresql-7.4.5.tar.gz
ALTERNATIVE: Unpack PostgreSQL 7.4.1.�If you have not downloaded the postgresql tarball to /tmp/postgresql-7.4.1.tar.bz2, get it.
[root root]# cd /usr/local/src [root src]# tar xfj /tmp/postgresql-7.4.1.tar.bz2 @@ -64,13 +64,13 @@[root src]# groupadd web [root src]# useradd -g web -d /usr/local/pgsql postgres [root src]# mkdir -p /usr/local/pgsql -[root src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4 +[root src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.4.5 [root src]# chmod 750 /usr/local/pgsql [root src]# groupadd web 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 +chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.4.5 chmod 750 /usr/local/pgsql
Mac OS X: Do instead:�First make sure the gids and uids below are available (change them if they are not).To list taken uids and gids:
nireport / /groups name gid | grep "[0123456789][0123456789]" nireport / /users name uid | grep "[0123456789][0123456789]" @@ -100,45 +100,45 @@ 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.On debian woody (stable, 3.0), do ./configure --without-readline --without-zlib.
[root src]# su - postgres -[postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4 -[postgres postgresql-7.3.4]$ ./configure --with-includes=/sw/include/ --with-libraries=/sw/lib --enable-locale --enable-multibyte \ +[postgres pgsql]$ cd /usr/local/src/postgresql-7.4.5 +[postgres postgresql-7.4.5]$ ./configure --with-includes=/sw/include/ --with-libraries=/sw/lib --enable-locale --enable-multibyte \ --enable-syslog --enable-unicode-conversion --enable-recode creating cache ./config.cache checking host system type... i686-pc-linux-gnu (many lines omitted> linking ./src/makefiles/Makefile.linux to src/Makefile.port linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s -[postgres postgresql-7.3.4]$ make all +[postgres postgresql-7.4.5]$ make all make -C doc all -make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc' +make[1]: Entering directory `/usr/local/src/postgresql-7.4.5/doc' (many lines omitted) -make[1]: Leaving directory `/usr/local/src/postgresql-7.3.4/src' +make[1]: Leaving directory `/usr/local/src/postgresql-7.4.5/src' All of PostgreSQL successfully made. Ready to install. -[postgres postgresql-7.3.4]$ make install +[postgres postgresql-7.4.5]$ make install make -C doc install -make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc' +make[1]: Entering directory `/usr/local/src/postgresql-7.4.5/doc' (many lines omitted) Thank you for choosing PostgreSQL, the most advanced open source database engine. su - postgres -cd /usr/local/src/postgresql-7.3.4 +cd /usr/local/src/postgresql-7.4.5 ./configure make all make install
Start PostgreSQL.� The initdb command initializes the database. pg_ctl is used to start up PostgreSQL. -
[postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +[postgres postgresql-7.4.5]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. (17 lines omitted) or /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start -[postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start +[postgres postgresql-7.4.5]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start postmaster successfully started -[postgres postgresql-7.3.4]$ +[postgres postgresql-7.4.5]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
PostgreSQL errors will be logged in @@ -147,15 +147,15 @@ access. Plpgsql is a PL/SQL-like language. We add it to template1, which is the template from which all new databases are created. We can verify that it was created - with the createlang command in list mode.
[postgres postgresql-7.3.4]$ createlang plpgsql template1 + with the createlang command in list mode.[postgres postgresql-7.4.5]$ createlang plpgsql template1 [postgres pgsql]$ createlang -l template1 Procedural languages Name | Trusted? ---------+---------- plpgsql | t (1 row) -[postgres pgsql-7.3.4]$ +[postgres pgsql-7.4.5]$ createlang plpgsql template1 createlang -l template1
Test PostgreSQL (OPTIONAL).�Create a database and try some simple commands. The output should be as shown.
[postgres pgsql]$ createdb mytestdb