Search · Index

Weblog

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

Install OpenACS with NaviServer from Scratch

Created by Gustaf Neumann, last modified by Gustaf Neumann 27 Apr 2017, at 07:26 AM

This page describes how to install OpenACS with NaviServer on Unix-like systems (e.g. Linux, Mac OS X, 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 installed (or obtainable via package managers), but 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 now 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. The scripts are tested with PostgreSQL 9.1, 9.2, 9.3, 9.4 and 9.5 on Ubuntu 12.04, 13.04, 14.04, Fedora Core 18 and CentOS 7.

On a 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

After running both scripts in the default configuration you will see e.g. on Ubuntu 14.04

   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-9.tcl -u nsadmin -g nsadmin

One can start the server manually with the mentioned command.

Using upstart

Alternatively, one can manage the service with upstart (Ubuntu/Debian). For upstart, the the generated startup file is in /etc/init/oacs-5-9.conf. The service can be started/managed with the following commands

    sudo initctl status oacs-5-9
    sudo initctl start oacs-5-9
    sudo initctl stop oacs-5-9

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-9.service. The startup commands for systemd are

    sudo systemctl status oacs-5-9
    sudo systemctl start oacs-5-9
    sudo systemctl stop oacs-5-9

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-9

Configuration

When the service is running, one can use use OpenACS by browsing to http://localhost:8000/ (when the browser and server is running on the same host). The configuration file is /usr/local/ns/config-oacs-5-9.tcl and might be tailored to your needs. The access.log and error.log of this instance are in /var/www/oacs-5-9/log/

 

Upgrade between PostgreSQL versions

Created by Gustaf Neumann, last modified by Gustaf Neumann 20 Sep 2016, at 02:06 PM

The probably easiest way to upgrade between PostgreSQL versions is as follows (described here from 9.4 to 9.5, based on the directory structure as provided by Mac Ports)

DATE=`date +"%Y-%m-%d"`
# Dump all databases from pg 9.4
PGBIN=/opt/local/lib/postgresql94/bin
sudo -u postgres $PGBIN/pg_dumpall | gzip -9 > ~/pg-dump-all-$DATE.gz

Then stop pg 9.4, start pg 9.5, then reload the dump:

# Restore all databases and roles from dump into pg 9.5
PGBIN=/opt/local/lib/postgresql95/bin
gunzip < ~/pg-dump-all-$DATE.gz |  $PGBIN/psql -U postgres

voilà, start OpenACS, and everything works fine.

In case there is a problem with restoring the dump in PostgreSQL 9.5 due to the "=>" operator of hstore, one has to update the version of hstore at least to 1.1 before dump/restore (the current version of hstore is 1.4; for details see hstore-upgrade ).

In case, you want to upgrade your legacy OpenACS installation from PostgreSQL 8.* to 9, read upgrade-oacs-5-8.

 

 

hstore

Created by Michael Aram, last modified by Gustaf Neumann 12 Apr 2016, at 10:39 AM

hstore  is a postgresql module, which is used optionally by newer versions of xowiki and xowf (xowiki content flow ) to provide quick access to the "instance_attributes" (the per-form or per-workflow attributes not part of the native content repository data model). The supporting functions (creating indices, etc) are currently mostly part of the xowiki sources (earlier: xowf).

Under Ubuntu, you can install hstore via:

    psql -d <yourdb> -tAc "create extension hstore"

You can then verify the successful installation on the ds/shell using:

    ::xo::db::has_hstore

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

Popular tags

17 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , CSP , CSRF , cvs , debian , emacs , engineering-standards , fedora , FreeBSD , guidelines , host-node-map , hstore , includelets , install , installation , installers , install-ns , javascript
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org