Forum OpenACS Q&A: Installation of OpenACS with Naviserver

I'm trying to install Naviserver and OpenACS using the following instructions: https://openacs.org/xowiki/naviserver-openacs

However, when I try to install OpenACS with: bash install-oacs.sh build

I get the following message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql is already the newest version (9.5+173).
postgresql-contrib is already the newest version (9.5+173).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
------------------------ Check Userids ----------------------------
grep nsadmin /etc/group => nsadmin:x:1000:
------------------------ Setup Database ----------------------------
Checking if oacs_user nsadmin exists in db.
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

What can I do to solve this problem?

Collapse
Posted by Benjamin Brink on

That error usually indicates that postgresql has not been installed yet, or is not running.

For Ubuntu, to see if any postgresql packages are installed, type in terminal window:

dpkg -l | grep -i postgresql

If nothing shows up, confirm that postgresql has not been installed manually:

psql -l

If 'psql -l' results in a list of databases or an error about "role does not exist", then posgresql is installed.

If postgresql is not installed, install it using:

apt-get install postgresql-client postgresql-contrib

To see if postgresql is running:

ps auxww | grep postgresql
Collapse
Posted by Juan Carlos on
I tried dpkg -l | grep -i postgresql and it showed me this list

ii libpq-dev 9.5.6-0ubuntu0.16.04 amd64 header files for libpq5 (PostgreSQL library)
ii libpq5:amd64 9.5.6-0ubuntu0.16.04 amd64 PostgreSQL C client library
ii postgresql 9.5+173 all object-relational SQL database (supported version)
ii postgresql-9.5 9.5.6-0ubuntu0.16.04 amd64 object-relational SQL database, version 9.5 server
ii postgresql-client-9.5 9.5.6-0ubuntu0.16.04 amd64 front-end programs for PostgreSQL 9.5
ii postgresql-client-common 173 all manager for multiple PostgreSQL client versions
ii postgresql-common 173 all PostgreSQL database-cluster manager
ii postgresql-contrib 9.5+173 all additional facilities for PostgreSQL (supported version)
ii postgresql-contrib-9.5 9.5.6-0ubuntu0.16.04 amd64 additional facilities for PostgreSQL

So it is installed. But when i tried psql -l It gave the same error I posted:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket//.s.PGSQL.5432"?

And ps auxww | grep postgresql showed me this:

root 13775 0.0 0.1 12944 964 pts/6 S+ 17:41 0:00 grep --color=auto postgresql

Collapse
Posted by Benjamin Brink on
Server is probably not running. To be sure to rule out other cases, follow these instructions:

https://help.ubuntu.com/community/PostgreSQL#could_not_connect_to_server:_No_such_file_or_directory

Collapse
Posted by Juan Carlos on
Then how do I start the server?
Collapse
Posted by Benjamin Brink on

Well, *usually* it starts automatically and remains in the background.

This is the normal way to start the service (or replace 'start' with 'stop' to stop it):

sudo service postgresql start

Or to manually start, try something like this:

/usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
Collapse
Posted by Juan Carlos on
Ok, that problem is solved, but now I have another one.

The tutorial asks me to do sudo bash, but that gave me this:
[sudo] password for postgres:

But, the postgres password doesnt work, I even changet it using ALTER USER.

What can I do?

Collapse
Posted by Benjamin Brink on

Login to your default user account ie exit postgres account:

exit

Then 'sudo bash' should work.

Collapse
Posted by Juan Carlos on
thanks.

I already installed Naviserver and Openacs

Collapse
Posted by Juan Carlos on
But sudo status 5.9 still doesnt work.
Collapse
Posted by Benjamin Brink on
Now that postgresql is installed, you might want to run the bash scripts again. Errors probably occurred in at least one of the scripts, if postgresql wasn't available.
Collapse
Posted by Gustaf Neumann on
For Ubuntu, be aware, that some Ubuntu systems use "upstart", others "systemd" and others both (see [1]). for starting stopping the openacs service in these systems, see [2]

[1] https://openacs.org/forums/message-view?message_id=5329975
[2] https://openacs.org/xowiki/naviserver-openacs

Collapse
Posted by Juan Carlos on
Thanks, problem solved.

Now, another question. I'm using a remote linux server, where I installed Naviserver. How do I connect to it to see naviserver from my Google Chrome in Windows