View · Index

Weblog

Filtered by popular tag install, 1 - 3 of 3 Postings (all, summary)

Install OpenACS with NaviServer from Scratch

Created by Gustaf Neumann, last modified by Brian Fenton 18 Aug 2023, at 03:00 PM

This page describes how to install OpenACS with NaviServer on Unix-like systems (e.g. Linux, macOS, Solaris, OmniOS) by compiling all but PostgreSQL from scratch, guided by script that collects the components from various sources, compiles it, etc.

The installation is done in two steps:

  • install-ns.sh: Install NaviServer and its components for a PostgreSQL installation from scratch by obtaining the relevant sources and compiling it. The script assumes PostgreSQL to be already installed (or obtainable via package managers), and installs all other components by obtaining it from the source repositories and compiling it from scratch (e.g. Tcl, tcllib, tDOM, libthread, nsf/XOTcl 2).
     
  • install-oacs.sh: Install OpenACS from CVS/git. This script configures a (pre-installed) PostgreSQL installation for
    OpenACS, adds hstore, installs OpenACS core, basic OpenACS packages, xowiki, xowf and optionally dotlrn from CVS/git and generates a config file and startup files (for Ubuntu and Fedora Core). The script assumes a pre-existing NaviServer installation, installed e.g. via install-ns.sh

 These install scripts are frequently updated when new components are released or problems are detected (commit log).

If you open the links above, use save-as in the browser to save the files. Alternatively, download the files as .zip file or clone the repository via GitHub.

   cd /usr/local/src
   git clone https://github.com/gustafn/install-ns
   cd install-ns

The scripts work under a typical Linux installation (e.g. Ubuntu, Fedora Core) as well as on Mac OS X or on OmniOS,  OpenBSD 6.1, 6.3, 6.6, 6.8, 6.9, FreeBSD 12.2, 13.0, Ubuntu 12.04, 13.04, 14.04, 16.04, 18.04, 20.04, Raspbian GNU/Linux 9.4 (stretch), Fedora Core 18, 20, 32, 35, CentOS 7, Roxy Linux 8.4, ArchLinux.. The scripts are tested (over the years) with PostgreSQL 9.1 to 14.5.

On a fresh Ubuntu installation, you should be able to download the two scripts from this page and install OpenACS with NaviServer in the following steps:

   sudo bash

   bash install-ns.sh
   bash install-ns.sh build

   bash install-oacs.sh
   bash install-oacs.sh build

When running "install-ns.sh", you will see an output like the following (shortened here).

SETTINGS   build_dir              (Build directory)                 /usr/local/src
           ns_install_dir         (Installation directory)          /usr/local/ns
           version_ns             (Version of NaviServer)           4.99.24
           git_branch_ns          (Branch for git checkout of ns)   main
           version_modules        (Version of NaviServer Modules)   4.99.24
           version_tcllib         (Version of Tcllib)               1.20
           version_thread         (Version Tcl thread library)      
           version_xotcl          (Version of NSF/NX/XOTcl)         2.4.0
           version_tcl            (Version of Tcl)                  8.6.12
           version_tdom           (Version of tDOM)                 0.9.1
           ns_user                (NaviServer user)                 nsadmin
           ns_group               (NaviServer group)                nsadmin
                                  (Make command)                    make
                                  (Type command)                    type -a
           ns_modules             (NaviServer Modules)              nsdbpg
           with_mongo             (Add MongoDB client and server)   0
           with_postgres          (Install PostgreSQL DB server)    1
           with_postgres_driver   (Add PostgreSQL driver support)   1
           with_system_malloc     (Tcl compiled with system malloc) 0
           with_ns_doc            (NaviServer documentation)        1

The values in the first column can be used to tailor the system for your needs by setting same-named shell variables. One can use e.g.

   version_tdom=0.9.3 bash install-ns.sh 

to configure the compilation to use tDOM in version 0.9.3 instead of 0.9.1. As a more detailed example, if you want to use the newest version of NaviServer, and you want to use a different build directory and get also some extra modules compiled from their git versions, use e.g. the following command:

   version_ns=GIT \
      build_dir=/usr/local/src-test \
      ns_modules="nsdbpg nsdbi nsdbipg nsudp nssmtpd nsloopctl" \
      bash install-ns.sh 

For standard setups, the default settings should be OK.

After running both scripts in the default configuration, you will see e.g.

   Congratulations, you have installed OpenACS with NaviServer on your machine.
   You might start the server manually with
       sudo /usr/local/ns/bin/nsd -t /usr/local/ns/config-oacs-5-10-0.tcl -u nsadmin -g nsadmin

One can start the server manually with the mentioned command.

Using systemd

On Fedora/CentOS or on Ubuntu installations starting with 15.04, systemd is used. The generated startup file for RedHat/Fedora is in /lib/systemd/system/oacs-5-10-0.service. The startup commands for systemd are

    sudo systemctl status oacs-5-10-0
    sudo systemctl start oacs-5-10-0
    sudo systemctl stop oacs-5-10-0

Remember, when a new systemd service is installed, systemd requires the following command to re-scan its service files:

    sudo systemctl daemon-reload

To start OpenACS automatically on every new start of the machine, issue the following command:

    sudo systemctl enable oacs-5-10-0

Using upstart

Alternatively, some older Ubuntu versions (up to 15.04) use upstart. For upstart, the the generated startup file is in /etc/init/oacs-5-9-1.conf. The service can be started/managed with the following commands

    sudo initctl status oacs-5-10-0
    sudo initctl start oacs-5-10-0
    sudo initctl stop oacs-5-10-0

Configuration

When the service is running, one can use OpenACS by browsing to http://localhost:8000/ (when the browser and server is running on the same host). The relevant files are stored under the following locations:

Configuration file /usr/local/ns/config-oacs-5-10-0.tcl
access.log /var/www/oacs-5-10-0/log/
error.log /var/www/oacs-5-10-0/log/
Source tree /var/www/openacs-5-10-0/packages/

 

Installing OpenACS on debian

Created by OpenACS community, last modified by Gustaf Neumann 21 Oct 2016, at 08:53 AM

This information is deprecated. Please refer to Installing OpenACS on debian.

The quicksheet versions:

You should know what you're doing when you use them.

notes

Tcl development headers are required for compiling Tcl packages yourself.

apt-get install tcl8.4-dev

Should you decide to Install OpenACS from source using general en:openacs-system-install instructions, refer to these notes for changes:

Installing Postgresql

Debian stable user should install PostGreSQL from source as detailed below, or they should use the www.backports.org backport for Postgres to get a more current version. Debian unstable users: the following process has been known to work (but you should double-check that the version of PostGreSQL is 7.3 or above):

For Debian stable users, you can use backports, by adding this line to the /etc/apt/sources.list


 

deb http://www.backports.org/debian stable bison postgresql openssl openssh tcl8.4 courier debconf spamassassin tla diff patch neon chkrootki

and perform this actions:

apt-get update
apt-get install postgresql postgresql-dev postgresql-doc
ln -s /usr/include/postgresql/ /usr/include/pgsql
ln -s /var/lib/postgres /usr/local/pgsql
ln -s /usr/include/pgsql /usr/local/pgsql/include
su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1"

..and proceed to the next section.

Installing PostgreSQL's Tsearch2


 

apt-get install postgresql-contrib

Creating the Postgres user.

Use adduser instead of useradd. Type man adduser for more info.

Compiling PostgreSQL

On debian woody (stable, 3.0), do:

./configure --without-readline --without-zlib 

Set PostgreSQL to start on boot

[root ~]# cp /var/tmp/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
[root ~]# chown root.root /etc/init.d/postgresql
[root ~]# chmod 755 /etc/init.d/postgresql
[root ~]# 
cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
chown root.root /etc/init.d/postgresql
chmod 755 /etc/init.d/postgresql

Test the script

[root ~]# /etc/init.d/postgresql stop
Stopping PostgreSQL: ok
[root ~]# 

If PostgreSQL successfully stopped, then use the following command to make sure that the script is run appropriately at boot and shutdown.

[root ~]# update-rc.d postgresql defaults
 Adding system startup for /etc/init.d/postgresql ...
   /etc/rc0.d/K20postgresql -> ../init.d/postgresql
   /etc/rc1.d/K20postgresql -> ../init.d/postgresql
   /etc/rc6.d/K20postgresql -> ../init.d/postgresql
   /etc/rc2.d/S20postgresql -> ../init.d/postgresql
   /etc/rc3.d/S20postgresql -> ../init.d/postgresql
   /etc/rc4.d/S20postgresql -> ../init.d/postgresql
   /etc/rc5.d/S20postgresql -> ../init.d/postgresql
[root ~]# /etc/init.d/postgresql start
Starting PostgreSQL: ok
[root ~]#

Debian defaults to starting all services on runlevels 2-5.

Installing Tcl

You can apt-get install tcl8.4-dev if you have the right version (stable users will need to add tcl8.4 to their sources.list file as described in the "Install Postgresql" section above. You will have to use /usr/lib/tcl8.4/ instead of /usr/local/lib when you try to find the tcl libraries, however.

apt-get install tcl8.4 tcl8.4-dev

 

and proceed to installing aolserver.

When installing aolserver, replace --with-tcl=/usr/local/lib/ with --with-tcl=/usr/lib/tcl8.4.

Installing AOLserver

To install AOLserver you can use apt command:

apt-get install aolserver4 aolserver4-nscache aolserver4-nspostgres aolserver4-nssha1 tdom

After installing AOLserver, You need to make the following symbolic link:

ln -s /usr/lib/aolserver4 /usr/local/aolserver

 

 

Try Openacs

Created by OpenACS community, last modified by Gustaf Neumann 01 May 2015, at 09:43 AM

To try OpenACS, you might lease a hosted system with OpenACS installed on it:

previous March 2024
Sun Mon Tue Wed Thu Fri Sat
25 26 27 28 29 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

Popular tags

17 , 5.10 , 5.10.0 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map , hstore
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org