Forum OpenACS Development: Re: Res: Re: New Installation Question

Posted by Héctor Romojaro on
Hi Raul,

At this point the openacs debian/ubuntu packages doesn't support multiple instances on the same server. You can make a copy of the /usr/share/openacs directory, change the owner, rebuild the symlinks... but it will be a mess, mainly at upgrading to a newer version later 🤔

If you are going to use more instances on the same server I recommend you to use the source instalation.

About the database errors, let's start for the beginning. It seems that aptitude is installing postgresql 8.3 when installing the openacs package, because postgresql-8.3 is the default postgresql version on ubuntu, and the package openacs recommends just "postgresql".

I corrected the wiki pages from debian and ubuntu to use apt-get instead of aptitude. Apt-get doesn't install by default the packages marked as "recommended", only straight dependencies.

I fixed some days ago an issue of the package related to connecting to postgresql with another user than default, so I recommend you to download the package again.

The default install works because the owner of the database is the same as the owner of the openacs files, the user www-data. The postgresql defaults for localhost socket connections are (from pg_hba.conf):

local all all ident sameuser

Which means that if you want to use a different DB user, you must allow access to that user on postgres, adding a line like this before the previous one on /etc/postgresql/8.2/main/pg_hba.conf:

local openacs user md5

If you are using a blank password, change "md5" for "trust", for example.

I will add a warning on the installer to beware people of granting access if they change the user. It goes beyond to the purpose of the installer to chan
ge the postgresql access policies, I think.

Well, let's start again and do the things right:

1- Purge some packages and drop database:

- Purge openacs
# sudo apt-get remove openacs --purge

- Purge postgresql 8.3
# sudo apt-get remove postgresql-8.3 postgresql-client-8.3 --purge

- Drop the database on postgresql 8.2 if it exists.
# sudo su - postgres -c 'dropdb openacs'

- Purge postgresql 8.2
# sudo apt-get remove postgresql-8.2 postgresql --purge

2- Start the install again:

# sudo apt-get clean
# sudo apt-get update
# sudo apt-get install postgresql-8.2
# sudo apt-get install openacs

Fill the questions and put whatever DB owner you want, if you granted access on postgresql to him :)

3- Check the install opening a browser on localhost:8000.

# firefox http://localhost:8000 (in example)

Cheers, Héctor

Posted by Héctor Romojaro on
Hi all,

I've just fixed some things on dotlrn and openacs debian packages:

- Postgresql and daemontools are now "Suggested" dependencies instead of "Recommends", to avoid problems with aptitude.
- The installer grants access permissions on postgresql's pg_hba.conf automatically if the user wants to (only if postgresql is installed on localhost).
- Fixed some issues with dpkg-reconfigure.

Purging previous packages is recommended before installing the new ones. To purge and install:

# sudo apt-get clean
# sudo apt-get update
# sudo apt-get remove openacs | dotlrn --purge
# sudo apt-get install openacs | dotlrn

The database is not dropped on purge, so don't be afraid of doing it :)

Cheers, Héctor