Index: openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.adp 25 Apr 2018 08:38:27 -0000 1.4
+++ openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.adp 3 Sep 2024 15:37:32 -0000 1.5
@@ -1,7 +1,11 @@
- The simplest way to start and stop and OpenACS site is to run
-the startup shell script provided, A more stable way to run OpenACS is with a "keepalive"
mechanism of some sort, so that whenever the server halts or is
@@ -40,72 +44,72 @@
started by the file Daemontools creates additional files and directories to track
+location is Daemontools creates additional files and directories to track
status and log. A daemontools directory is included in the OpenACS
-tarball at Verify that AOLserver is running. Verify that AOLserver is running. The user The user $OPENACS_SERVICE_NAME can now control
+the service $OPENACS_SERVICE_NAME with these
commands:
-
-
-
-
-
+
+
+
+ Install a script to automate the stopping and starting of
AOLserver services via daemontools. You can then restart a service
-via /var/lib/aolserver/
.
+the startup shell script provided, $OPENACS_SERVICE_NAME
/etc/daemontools/run/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
.
This runs as a regular task, and logs to the logfile. To stop the
site, kill the script./service/$OPENACS_SERVICE_NAME/run
. But we
use a symlink to make it easier to add and remove stuff from the
/service
, so the actual
-location is /var/lib/aolserver/
.$OPENACS_SERVICE_NAME
etc/daemontools/run/var/lib/aolserver/$OPENACS_SERVICE_NAMEetc/daemontools/run
./var/lib/aolserver/
.
+tarball at $OPENACS_SERVICE_NAME
/etc/daemontools/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools
.
To use it, first ill any existing AOLserver instances. As root,
link the daemontools
directory
into the /service
directory.
Daemontools' svscan
process
checks this directory every five seconds, and will quickly execute
run
.[$OPENACS_SERVICE_NAME etc]$
killall nsd
nsd: no process killed
-[$OPENACS_SERVICE_NAME etc]$ emacs /var/lib/aolserver/
+[$OPENACS_SERVICE_NAME etc]$ $OPENACS_SERVICE_NAME
/etc/daemontools/runemacs /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
[$OPENACS_SERVICE_NAME etc]$ exit
-[root root]# ln -s /var/lib/aolserver/
$OPENACS_SERVICE_NAME
/etc/daemontools/ /service/$OPENACS_SERVICE_NAME
+[root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/ /service/$OPENACS_SERVICE_NAME
-[root root]#
ps -auxw | grep nsd
$OPENACS_SERVICE_NAME
5562 14.4 6.2 22436 15952 ? S 11:55 0:04 /usr/local/aolserver/bin/nsd -it /var/lib/aolserver/$OPENACS_SERVICE_NAME
/etc/config.tcl -u serve
+[root root]#
ps -auxw | grep nsd
$OPENACS_SERVICE_NAME 5562 14.4 6.2 22436 15952 ? S 11:55 0:04 /usr/local/aolserver/bin/nsd -it /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl -u serve
root 5582 0.0 0.2 3276 628 pts/0 S 11:55 0:00 grep nsd
[root root]#$OPENACS_SERVICE_NAME
can now
-control the service $OPENACS_SERVICE_NAME
with these
+
svc -d /service/
-
-Bring the server down$OPENACS_SERVICE_NAME
-svc -u /service/
-
-Start the server up and leave it in keepalive mode.$OPENACS_SERVICE_NAME
-svc -o /service/
-
-Start the server up once. Do not restart it if it stops.$OPENACS_SERVICE_NAME
-svc -t /service/
- Stop
-and immediately restart the server.$OPENACS_SERVICE_NAME
-svc -k /service/
-
-Sends the server a KILL signal. This is like KILL -9. AOLserver
-exits immediately. If svc -t fails to fully kill AOLserver, use
-this option. This does not take the server out of keepalive mode,
-so it should still bounce back up immediately.$OPENACS_SERVICE_NAME
-svc -d /service/$OPENACS_SERVICE_NAME
+
- Bring
+the server downsvc -u /service/$OPENACS_SERVICE_NAME
+
- Start
+the server up and leave it in keepalive mode.svc -o /service/$OPENACS_SERVICE_NAME
+
- Start
+the server up once. Do not restart it if it stops.svc -t /service/$OPENACS_SERVICE_NAME
+
- Stop and
+immediately restart the server.svc -k /service/$OPENACS_SERVICE_NAME
+
- Sends
+the server a KILL signal. This is like KILL -9. AOLserver exits
+immediately. If svc -t fails to fully kill AOLserver, use this
+option. This does not take the server out of keepalive mode, so it
+should still bounce back up immediately.restart-aolserver
$OPENACS_SERVICE_NAME
+via restart-aolserver $OPENACS_SERVICE_NAME
-[root root]#
cp /var/lib/aolserver/
+$OPENACS_SERVICE_NAME
/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
[root root]#cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
[root root]#chmod 755 /usr/local/bin/restart-aolserver
[root root]#
At this point, these commands will work only for the
root
user. Grant permission for
the web
group to use
svc
commands on the
-$OPENACS_SERVICE_NAME
-server.
[root root]# /usr/local/bin/svgroup web /service/$OPENACS_SERVICE_NAME
+$OPENACS_SERVICE_NAME
+server.[root root]# /usr/local/bin/svgroup web /service/$OPENACS_SERVICE_NAME
[root root]#
Verify that the controls work. You may want to tail -f /var/lib/aolserver/
+$OPENACS_SERVICE_NAME
/log/$OPENACS_SERVICE_NAME
-error.log
Verify that the controls work. You may want to tail -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME-error.log
in another window, so you can see what happens when you type these
commands.
More information can be found on the AOLserver Daemontools page.
Table 6.1. How it
+ Table 6.1. How it
Works
svscanboot init /etc/inittab ps -auxw | grep readproctitle n/a
- aolserver supervise (a child of svscanboot) /service/ $OPENACS_SERVICE_NAME
/run/var/lib/aolserver/ $OPENACS_SERVICE_NAME
/log/error.log/var/lib/aolserver/ $OPENACS_SERVICE_NAME
/log/$OPENACS_SERVICE_NAME.logsvc -k /service/ $OPENACS_SERVICE_NAME
+aolserver supervise (a child of svscanboot) /service/$OPENACS_SERVICE_NAME/run /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.log svc -k /service/$OPENACS_SERVICE_NAME
postgresql Redhat init scripts during boot /etc/init.d/postgresql /usr/local/pgsql/data/server.log service postgresql start (Red Hat),