Accounts Payables
Created by OpenACS community, last modified by Gustaf Neumann 12 Sep 2013, at 08:51 AM
Status
pre-release
Introduction
Part of the ecommerce-g2 project
Feature requests
- add requests here
Created by OpenACS community, last modified by Gustaf Neumann 12 Sep 2013, at 08:51 AM
pre-release
Part of the ecommerce-g2 project
Created by OpenACS community, last modified by Gustaf Neumann 12 Sep 2013, at 08:50 AM
pre-release
Part of the ecommerce-g2 project
add requests here
Created by OpenACS community, last modified by Jim Lynch 06 Sep 2013, at 12:21 AM
Start tcl (type tclsh or find it using which tclsh).
[root root]% info exists tcl_platform(threaded)
1
[root root]% info patchlevel
8.5.14
[root root]%
If the first command returns anything other than 1, then tcl is not threaded. If tcl is threaded and the version is 8.5 or higher, then installing tcl from source is optional.
(jiml) Note that you will also need compiletime stuff so you can build things against that tcl; how to get it varies according to what OS and flavor thereof you run. Personally, I don't like to permit the operating system to dictate any versions of anything or have any influence over installing/removing, so I build the whole stack (these days, not including postgres) myself.
Get TCL 8.5 (or higher). Download and install TCL 8.5 from source.
If you have not installed TCL already, download the latest TCL version from Sourceforge or http://www.tcl.tk/software/tcltk/downloadnow85.html
We are installing tcl in context with aolserver to use a consistent set of libraries when more than one version may be present. Use the same directory for aolserver here, that you will be using when installing aolserver from the en:aolserver-install page.
Remember that you have to be logged in as root to issue the following commands.
[root root]# mkdir -p /usr/local/src/aolserver40r10 [root root]# cd /usr/local/src/aolserver40r10 [root src]# wget http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.5.14-src.tar.gz [root src]# tar xfz tcl8.5.14-src.tar.gz [root src]# cd tcl8.5.14/unix [root unix]# ./configure --enable-threads --prefix=/usr/local/aolserver40r10 [root unix]# make install [root root]#
ref: https://openacs.org/doc/aolserver4.html
Pull info from: http://www.tcl.tk/software/tcltk/downloadnow85.html
Created by OpenACS community, last modified by Gustaf Neumann 20 Aug 2013, at 01:32 PM
Redhat publishes 2 versions of their OS, Fedora (FC) and Redhat Enterprise...
The quicksheet versions:
You should know what you're doing when you use them.
Should you decide to Install OpenACS from source using general en:openacs-system-install instructions, refer to these notes for changes.
Some of these notes below are probably outdated by now, but might still give some useful hints for certain installations.
If you install PostgreSQL 7.3.2 from the Red Hat 9 RPM, you can skip a few steps. These shell commands add some links for compatibility with the directories from a source-based install; start the service; create a new group for web service users, and modify the postgres user's environment (more information):
[root root]# ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
[root root]# ln -s /var/lib/pgsql /usr/local/pgsql
[root root]# ln -s /etc/init.d/postgresql /etc/init.d/postgres
[root root]# ln -s /usr/bin /usr/local/pgsql/bin
[root root]# service postgresql start
Initializing database:
[ OK ]
Starting postgresql service: [ OK ]
[root root]# echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
[root root]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
[root root]# groupadd web
[root root]# su - postgres
-bash-2.05b$
ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
ln -s /var/lib/pgsql /usr/local/pgsql
ln -s /usr/bin /usr/local/pgsql/bin
service postgresql start
echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
groupadd web
su - postgres
... and then skip to the section in en:postgresql-install that deals with installing plpgsql.
Red Hat RPM:
The init script is already installed; just turn it on for the appropriate run levels.
[root root]# chkconfig --level 345 postgresql on [root root]#
Red Hat from source:
[root src]# cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
[root src]# chown root.root /etc/rc.d/init.d/postgresql
[root src]# chmod 755 /etc/rc.d/init.d/postgresql
[root src]#
cp /var/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
chown root.root /etc/rc.d/init.d/postgresql
chmod 755 /etc/rc.d/init.d/postgresql
Test the script.
[root root]# service postgresql stop Stopping PostgreSQL: ok [root root]#
If PostgreSQL successfully stopped, then use the following command to make sure that the script is run appropriately at boot and shutdown. And turn it back on because we'll use it later.
[root root]# chkconfig --add postgresql
[root root]# chkconfig --level 345 postgresql on
[root root]# chkconfig --list postgresql
postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root root]# service postgresql start
Starting PostgreSQL: ok
[root root]#
chkconfig --add postgresql
chkconfig --level 345 postgresql on
chkconfig --list postgresql
service postgresql start
Red Hat defaults to starting services on 3-5. So, on Red Hat, PostgreSQL won't start on runlevel 2 unless you alter the above commands a little. This usually isn't a problem as Red Hat defaults to runlevel 3)
Created by Alvaro Rodriguez, last modified by josue ruiz 21 Dec 2012, at 12:22 AM
The Content package was first developed by Byron Linares (Galileo University) as a portlet using xowiki as the main package, adding all the files and modifications needed in xowiki. The automatic template included was specific for the Galileo's theme.
Created by Jim Lynch, last modified by Jim Lynch 13 Jul 2012, at 12:35 AM
description/intro paragraph (this might as well be inline)
(all the rest are menu items, which probably open into submenu which has content)
getting started with git for openacs
git for openacs users
git for openacs coders and contributors
openacs release management using git
managing the repos
Created by Malte Sussdorff, last modified by Gustaf Neumann 03 Nov 2011, at 02:26 PM
I worked off the work of Dave Bauer and used Macports.
Unfortunately, the default configuration of Mac OS X does not allow suitable amounts of shared memory to be created to run the database server.
Therefore you should edit your /etc/sysctl.conf
On a MacBook Pro with 2GB of RAM, the author's sysctl.conf contains:
kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048
Download and install MacPorts from http://www.macports.org/install.php and get the latest version (1.7.1 as of 2009-04-18)
sudo port -k install postgresql84 cd `port work postgresql84`/postgresql-8.4.7/contrib/ltree make all sudo make install sudo port install postgresql84-serverThis installs expat, gperf, libiconv, ncursesw, ncurses, gettext, m4, bison, zlib, libxml2, libxslt1, openssl, readline, postgresql82. The macports install then says
To create a database instance, after install do
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
Then after initdb postgres says to start postgresql. Before that edit the config file to make it compatible with ACS
sudo emacs -nw /opt/local/var/db/postgresql84/defaultdb/postgresql.confOnce you have emacs open, change the following config items:
autovacuum = on
add_missing_from = on
default_with_oids = on
regex_flavor = extended
Now start the PostgreSQL Server
sudo su postgres -c '/opt/local/lib/postgresql84/bin/postgres -D /opt/local/var/db/postgresql84/defaultdb' &
Install plpgsql as a language
/opt/local/lib/postgresql84/bin/createlang plpgsql template1 -U postgres
Last but not least, put postgresql under launchctl so you can start and stop it:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist
To start it from then on just call
sudo launchctl start org.macports.postgresql84-server
To stop it:
sudo launchctl stop org.macports.postgresql84-server
sudo port install tcl +threads +headers
This will install Tcl with threads enabled, which is needed for AOLserver.
sudo port install aolserverNow we have AOLserver installed into /opt/local/aolserver. You now need to configure the server to your needs. You might want to create another user (e.g. aolserver) to run the server. First get all the files:
cd /usr/local/src
mkdir aolserver
cd aolserver
TCLLIB=1.13
XOTCL=1.6.7
# Path for the AOLserver installation
NS=/opt/local/aolserver
cvs -z3 -d:pserver:anonymous@aolserver.cvs.sourceforge.net:/cvsroot/aolserver co nssha1
cvs -z3 -d:pserver:anonymous@aolserver.cvs.sourceforge.net:/cvsroot/aolserver co nspostgres
echo "Getting TDOM ..."
git clone git://github.com/tDOM/tdom.git
echo "Getting TCL modules ..."
curl -L -O http://downloads.sourceforge.net/tcllib/tcllib-${TCLLIB}.tar.bz2
curl -L -O http://downloads.sourceforge.net/tcl/thread2.6.5.tar.gz
curl -L -O http://media.wu-wien.ac.at/download/xotcl-${XOTCL}.tar.gz
Now install nssha1
cd nssha1
sudo make install NSHOME=${NS}
cd ..
Now go for nspostgres
cd nspostgres/
# Edit the Makefile so it reads (adding the "-lnsdb")
MODLIBS = -L$(PGLIB) -lpq -lnsdb
sudo make install AOLSERVER=/opt/local/aolserver/ PGCONFIG=/opt/local/lib/postgresql84/bin/pg_config POSTGRES=/opt/local PGINC=/opt/local/include/postgresql84/ PGLIB=/opt/local/lib/postgresql84/ ACS=1
cd ..
tDOM
cd tDOM-0.8.2/unix
../configure --mandir=/usr/local/share/man --libdir=/opt/local/aolserver/lib --with-tcl=/opt/local/lib --with-aolserver=/opt/local/aolserver
sudo make install
cd ../..
Thread
tar xvfz thread2.6.5.tar.gz
cd thread2.6.5/unix
../configure --mandir=/usr/local/share/man --libdir=/Library/Tcl --with-tcl=/System/Library/Frameworks/Tcl.framework --with-tclinclude=/System/Library/Frameworks/Tcl.framework/Headers --with-aolserver=/opt/local/aolserver
sudo make install
cd ../..
XOTcl
The private header files of Tcl are missing, therefore I got the source and recompiled Tcl:
curl -L -O http://downloads.sourceforge.net/tcl/tcl8.5.9-src.tar.gz
tar xfz tcl8.5.9-src.tar.gz
cd tcl8.5.9/unix
./configure --enable-threads --prefix=/opt/local --disable-corefoundation
sudo make install
cd ../..
tar xvfz xotcl-1.6.7.tar.gz
cd xotcl-1.6.7
NS=/opt/local/aolserver/
./configure --enable-threads --enable-symbols --prefix=${NS} --exec-prefix=${NS} --with-tcl=/opt/local/lib
sudo make install-aol
cd ..
Now we finish off with tcllib
tar xvfj tcllib-1.13.tar.bz2 cd tcllib-1.13 ./configure --prefix=/opt/local/aolserver/ sudo make installType in terminal before starting nsd
ulimit -n 256I would recommend to install the server in ~/Sites/yourserver if you don't intend to run multiple different servers with access rights on your machine. Checkout the OpenACS code and Edit ~/Sites/yourserver/etc/config.tcl and make the following changes
# Change the server root
set serverroot "~/Sites/${server}"
# Make sure that OpenACS finds PostgreSQL. Add two lines to the $database if statement
if { $database eq "oracle" } {
set db_password "mysitepassword"
} else {
set db_host localhost
set db_port ""
set db_user $server
ns_section "ns/db/driver/postgres"
ns_param pgbin /opt/local/lib/postgresql84/bin/
}
# Change the AOLserver location
set homedir /opt/local/aolserver
Now you can start up your server. First try ist with /opt/local/aolserver/bin/nsd -t ~/Sites/yourserver/etc/config.tcl. If this works you might want to create a launchctl entry as you did above for postgresql
Edit /Library/LaunchDaemons/org.openacs.YOURSERVER.plist and enter the following
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openacs.YOURSERVER</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/youruser/Sites/yourserver/etc/daemontools/run</string>
</array>
<key>ServiceDescription</key>
<string>OpenACS Service</string>
<key>UserName</key>
<string>youruser</string>
<key>GroupName</key>
<string>staff</string>
</dict>
</plist>
Now put yourserver under launchctl so you can start and stop it:
sudo launchctl load -w /Library/LaunchDaemons/org.openacs.yourserver.plist
To start it from then on just call
sudo launchctl start org.openacs.yourserver
To stop it:
sudo launchctl stop org.openacs.yourserver
It is a good idea to schedule regular backups for your server(s). To do this create a shell script, e.g. backup.sh which executes your backups and then create a launchdaemon plist to run your backups nightly
Edit /Library/LaunchDaemons/org.openacs.backup.plist and enter the following
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openacs.backup</string>
<key>ProgramArguments</key>
<array>
<string>/Users/youruser/Sites/backup.sh</string>
</array>
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
</dict>
</plist>
If you intend to run AOLserver on a continous basis remember that it is a great idea to make sure it responds properly. To do this you can run a keepalive service.
Edit /Library/LaunchDaemons/org.openacs.keepalive.plist and enter the following
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openacs.keepalive.plist</string>
<key>ProgramArguments</key>
<array>
<string>/Users/youruser/Sites/keepalive.sh</string>
<string>yourserver</string>
<string>yourport</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>180</integer>
</dict>
</plist>
Your keepalive.sh could look like this
#!/bin/bash
GREP=/usr/bin/grep
HEAD="/usr/bin/head -1"
INSTANCE="$1";
PORT="$2"
[ -z "$1" ] && exit
[ -z "$2" ] && exit
MAIL_ADDR=""
WGET_FILE=/tmp/.output-keepalive-${INSTANCE}
URL_TEST="http://127.0.0.1:${PORT}/SYSTEM/dbtest"
[ -f ${WGET_FILE} ] && rm -f ${WGET_FILE}
_restartwebserver ()
{
/bin/launchctl start org.openacs.$INSTANCE
sleep 3
/bin/launchctl start org.openacs.$INSTANCE
}
_sendmail ()
{
echo "${1}" |mailx -s AolWebserver ${MAIL_ADDR}
}
while [ 1 -eq 1 ];
do
[ -f ${WGET_FILE} ] && /bin/rm -f ${WGET_FILE}
/usr/bin/curl -s -o $WGET_FILE --connect-timeout 3 --retry 3 "${URL_TEST}"
if [ -f ${WGET_FILE} ]
then
FIRST_LINE=`${HEAD} ${WGET_FILE} | ${GREP} -i "success"`
[ -z "${FIRST_LINE}" ] && _restartwebserver && _sendmail "I just restarted the $INSTANCE webserver on `uname -n`" && echo "`date +'%D-%H:%M'` :: FAILURE" || echo "`date +'%D-%H:%M'` :: success $INSTANCE" >>/Users/malte/Sites/keepalive.log
else
_restartwebserver && _sendmail "I just restarted the $INSTANCE webserver on `uname -n`"
# _restartwebserver
echo "`date +'%D-%H:%M'` :: FAILURE"
fi
done
If you intend to run AOLserver on a continous basis remember that it is a great idea to restart your server once per night, otherwise the memory footprint will grow and grow and grow.
Edit /Library/LaunchDaemons/org.openacs.restart.plist and enter the following
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openacs.restart</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/youruser/Sites/restart.sh</string>
</array>
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>4</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
</dict>
</plist>
Now put scripts under launchctl so they will run in the night:
sudo launchctl load -w /Library/LaunchDaemons/org.openacs.backup.plistsudo launchctl load -w /Library/LaunchDaemons/org.openacs.restart.plist
sudo launchctl load -w /Library/LaunchDaemons/org.openacs.keepalive.plist
Your restart.sh could look like this
#!/bin/bash echo "cognovis" sudo launchctl stop org.openacs.yourserver sleep 10 sudo launchctl start org.openacs.yourserver
Created by Jeff Davis, last modified by Jeff Davis 04 Nov 2010, at 03:22 PM

| Name | Content Type | Last Modified | By User | Size (Bytes) |
|---|---|---|---|---|
| commits.png | image/png | 2010-11-04 15:22:29+01 | Jeff Davis | 4670500 |
Created by Ryan Gallimore, last modified by Ryan Gallimore 10 Apr 2010, at 07:29 PM
To automatically install packages with specific parameters and mount points, create an install.xml file in your /path/to/service/ directory, according to: