Forum OpenACS Q&A: Postgres7.1 Redhat RPM and installation instructions

Section 5.5 from the Installation Guide

I've installed PostgreSQL7.1 from the RPM for Redhat and when attempting to load the data model, (psql -f load-data-model.sql ...) However, it appears that most of the definitions in postgres.sql are already defined (line 18, 27, 38, 44, 52, 61, 71, 81, 102 ...) Ideas?

Do you have a PG 7.0 OpenACS installation?  I guarantee that things like "sysdate()" are not pre-defined in PG 7.1.

My guess is that your PG environment variables are set up to /usr/local/pgsql (where PG is installed if you build from sources) rather than wherever it is placed by the RPMs (I know it's not there but forget exactly where it they're put).

You need to set your environment variables correctly, do an initdb, start the postmaster, do a createdb etc etc etc.

Ok, I understand what's going on but am not sure how best to proceed. In following the RPM install doc

    rpm -ivh postgresql-7.1-1.i386.rpm
had a dependency that required the library package (this isn't one of the packages listed in the doc). I downloaded postgresql-libs-7.1-1.i386.rpm and used the command

    rpm -ivh postgresql-libs-7.1-1.i386.rpm
to install it and proceeded with the instructions. Everything appeared to be OK - I could start postgres, create a db, load-geo-tables - until I get to the load the data model section.

Since I installed from an RPM, I have to edit the postgres.sql file to remove the comments:


    --create function plpgsql_call_handler() RETURNS opaque
    --as '/usr/lib/pgsql/plpgsql.so' language 'c';

The first thing that I notice is that the plpgsql.so library file installed via the RPM is NOT in the pgsql subdirectory. It has been installed (together with the other library files) in the /usr/lib directory.

Changing the postgres.sql line above to exclude the pgsql subdirectory


    as '/usr/lib/plpgsql.so' language 'c';

doesn't solve the problem as I expect there are other dependencies on the libraries being in the usr/lib/pgsql subdirectory.

I'm a Linux novice and not sure how to proceed. How do I get the library files in the /usr/lib/pgsql directory via the RPM command. Do I have to uninstall all of the Postgres RPM packages and start again or is there a way to move the postgresql-libs-7.1-1.i386.rpm library package into the pgsql directory?

Michael Serio wrote:
> I'm a Linux novice and not sure how to proceed

If you are using Red Hat 6.2 and want to do an RPM-based install of OpenACS 3.2.4, do please just try my new RPMs. From stock RH 6.2 box to running OpenACS under under two minutes.

See whichfilesdoineed.html for the current state of things, as well as this thread.

I am trying to make OpenACS installation really truly easy on Red Hat Linux, so it would be really helpful for me to have some feedback from a newcomer like yourself.

By creating a pgsql subdirectory under /usr/lib and manually moving files into this directory I was able to get the load to work. I queried the lib package and all of it's contents get installed at /usr/lib not /usr/lib/pgsql. However, the offending file appears to have been plpgsql.so which isn't part of any packages according to rpm. I don't know where this file comes from in the install process or why I had to make a pgsql subdirectory for this file. Now, on to tweaking NSD.TCL...
I was able to get ACS running. The last snag was referring to hostname in my nsd.tcl file as localhost.localdomain (not localhost.com)

Overall the installation process was quite confusing and frustrating. Wish I had seen the link below (which I found via the Q&A forums) sooner.
http://neasys.lyang.net/openacs/quickinstall.html

Perhaps this can become the simple install (which currently isn't very simple)?