Forum OpenACS Q&A: Can I install 2 different versions of openacs in the same server?

I have sites on production running in openacs 5.9, and i want to install newest version openacs 5.10 without affecting the current installation, it is possible to have 2 different versions of openacs in the same server?
No problem, we do it all the time; some of our machines have more than a dozen instances running. One needs in essence a separate database, a separate installation tree and configuration file and a different port.

Assume, you will name your new instance "oacs-5-10". Create in the PostgreSQL cluster an additional database with this name (see below), create a separate configuration file for the new instance with a new "serverroot", "db_name" and a different port (when you want to run both versions at the same time). Install OpenACS 5.10 in a tree different to your 5.9 installation (e.g. /var/www/oacs-5-10). When you use a configuration file like [1], changing the Tcl variable "server" and "httpport"/"httpsport" should be sufficient.

To create an additional DB, Assuming, you have already a db user "nsadmin", you can create the additional database with commands like the following (where you will have to adjust the PG* variables according to your installation)

DB=oacs-5-10
PG=postgresql13
PGBIN=/opt/local/lib/${PG}/bin
sudo -u postgres $PGBIN/createdb -U nsadmin $DB
sudo -u postgres ${PGBIN}/psql -U nsadmin $DB -tAc "create extension hstore"
[1] https://bitbucket.org/naviserver/naviserver/src/master/openacs-config.tcl

Thanks Gustaf,

How about 2 different instances of naviserver in the same server, since the version that works with oacs 5.9 is not working for oacs 5.10

Yes, you can install multiple versions of NaviServer. If you are using install-ns.sh, just change "ns_install_dir" to a different location (e.g. /usr/local/ns-4.99.20)

In our installations, the same naviserver works with OpenACS 5.9.* and 5.10.*. What is the version you say does not work with 5.10.0? OpenACS requires newer versions of Tcl, XOTcl, PostgreSQL than 5.9 (see https://openacs.org/doc/release-notes).

Hi Gustaf and thanks for your previous responses, I have already installed the versions of tcl, xotcl and postgres needed for 5.10. The service is up, but when loading i get to see the configuration page, and when it finish the loading i got a message "the connection timed out" in error log i got this
[12/Oct/2021:17:15:36][9591.7fd558298740][-main:oacs-5-10-] Error: modload: /usr/local/ns/bin/nssha1.so: couldn't load file "/usr/local/ns/bin/nssha1.so": /usr/local/ns/bin/nssha1.so: cannot open shared object file: No such file or directory
[12/Oct/2021:17:15:36][9591.7fd558298740][-main:oacs-5-10-] Fatal: modload: failed to load module '/usr/local/ns/bin/nssha1.so'
Dear Veronica,

NaviServer does not come with an nssha1 module, because it is not needed (the command "ns_sha1" is built-in, NaviServer supports, in addition, many more message digests such as sha2 and sha3 and others via ns_md, see [1]). The ns_sha1 module was removed from NaviServer more than 10 years ago... so i assume, your old version was based on AOLserver, and you are reusing an AOLserver configuration file.

In your case, you can remove the module loading the nssha1.so module from the configuration, but I would recommend using an actual NaviServer configuration file since you will like to use many of its features. The recommended configuration file is [2] is installed via install-oacs.sh.

-gn

[1] https://naviserver.sourceforge.io/n/naviserver/files/ns_md.html
[2] https://bitbucket.org/naviserver/naviserver/src/master/openacs-config.tcl