Installing custom Eloquence 8.xx versions "side by side" with 8.0 ================================================================= This note describes two possible approaches for installing one or more customized versions of Eloquence 8.xx software "side by side" with the regular Eloquence 8.0 product installation. It may be useful in situations where you want to have different Eloquence versions or patch levels available for testing without changing the installed "primary" version. Two slightly different methods are described below: Method #1 involves minimum changes and provides a separate start script so that selected eloqdb servers may be (manually) started with either software version. By using the same instance config and pid files as the regular eloq8 start script, this approach makes all configured instances available for starting with the alternate versions and shows all running instances in the eloq8 status output, regardless of the version that is running. Method #2 involves more changes than method #1 and provides not only a separate start script, but also separate instance config and pid files. This allows independent configuration of the eloqdb instances to control whether they may be started with either version or only one of them. It also results in independent output of the eloq8* status command: only instances started with that version will be shown. Both methods use a separate subdirectory in /opt/eloquence to maintain the different Eloquence 8.x versions or patch levels of programs, libraries and other product files. Note that the remainder of this document focuses on describing the setup for the database server start/stop/status activities. In addition to running different server versions, you may also need to make adjustments to environment variables like PATH or SHLIB_PATH or LD_LIBRARY_PATH for running database applications or utilities, in case there are version differences as well. A more recent database server version might also require the use of more recent client libraries or tools like dbutil, for example. System dependencies ------------------- This document applies to HP-UX and Linux platforms. The following table lists system specific directory names that differ between the HP-UX and Linux platforms. The remainder of this document (and the examples) will use the HP-UX names; for Linux platforms you will need to use the matching substitute. HP-UX SuSE Linux Debian Linux /sbin/init.d /etc/init.d /etc/init.d /sbin/rc*.d /etc/init.d/rc*.d /etc/rc*.d /etc/rc.config.d /etc/sysconfig /etc/default Method #1: separate code, common startup config & status -------------------------------------------------------- new binaries in /opt/eloquence/8.xx startup config in /etc/rc.config.d/eloquence8 pid files in /var/opt/eloquence/8.0 You should be logged on as root user for the steps below. 1a. clone /opt/eloquence/8.0 (and customize) # cd /opt/eloquence # cp -rp 8.0 8.xx ( replace e.g. 8.xx/bin files with new versions now ) 1b. create alternate start script (based on eloq8) # cd /sbin/init.d # example for hp-ux ( create 1-line eloq8xx file with vi or other editor ) ELOQUENCE=/opt/eloquence/8.xx /sbin/init.d/eloq8 $* # chmod 755 eloq8xx ( do NOT symlink eloq8xx in /sbin/rc*.d ) Now you use the /sbin/init.d/eloq8xx script to start the alternate server version (use /etc/init.d/eloq8xx on Linux). Usage is like the regular eloq8 script. Note that the server instances should not be configured for automatic start (ELOQDB_START[x]=1) unless you want them to be started with regular eloq8 by default. Example (hp-ux): # ls -ld /opt/eloquence/* dr-xr-xr-x 10 bin bin 8192 Jul 15 2008 /opt/eloquence/8.0 dr-xr-xr-x 10 bin bin 8192 Jul 15 2008 /opt/eloquence/8.xx # ls -ld /etc/rc.config.d/elo* -r-xr-xr-x 1 bin bin 3241 May 23 2008 /etc/rc.config.d/eloquence8 # ls -ld /sbin/init.d/elo* -r-xr-xr-x 1 bin bin 5439 Nov 11 2008 /sbin/init.d/eloq8 -rwxr-xr-x 1 root sys 53 Oct 20 15:58 /sbin/init.d/eloq8xx # /sbin/init.d/eloq8xx start sample Starting eloqdb[sample] daemon [OK] # /sbin/init.d/eloq8 status eloqsd process is not active [unused] eloqdb[eloqdb] process is not active [unused] eloqdb[sample] process is active (pid 20514) [running] # /sbin/init.d/eloq8xx stop sample Stopping eloqdb[sample] daemon [OK] Method #2: separate code, separate startup config & status ---------------------------------------------------------- new binaries in /opt/eloquence/8.zz startup config in /etc/rc.config.d/eloquence8zz pid files in /var/opt/eloquence/8.zz You should be logged on as root user for the steps below. 1a. clone /opt/eloquence/8.0 (and customize) # cd /opt/eloquence # cp -rp 8.0 8.zz ( replace e.g. 8.zz/bin files with new versions now ) 1b. create alternate start script (based on eloq8) # cd /sbin/init.d # example for hp-ux # cp eloq8 eloq8zz ( customize eloq8zz file with editor, see diff below ) # diff eloq8 eloq8zz 18c18 < ELOQUENCE=${ELOQUENCE:=/opt/eloquence/8.0} --- > ELOQUENCE=${ELOQUENCE:=/opt/eloquence/8.zz} 33c33 < RCFILE=/etc/rc.config.d/eloquence8 --- > RCFILE=/etc/rc.config.d/eloquence8zz 1c. customize alternate etc/rcfunctions script as well # cd /opt/eloquence ( customize 8.zz/etc/rcfunctions file with editor ) # diff 8.0/etc/rcfunctions 8.zz/etc/rcfunctions 17c17 < ELOQUENCE=${ELOQUENCE:=/opt/eloquence/8.0} --- > ELOQUENCE=${ELOQUENCE:=/opt/eloquence/8.zz} 39c39 < pid_dir=/var/opt/eloquence/8.0/run --- > pid_dir=/var/opt/eloquence/8.zz/run 1d. create (customized) alternate instance config # cd /etc/rc.config.d # example for hp-ux # cp -p eloquence8 eloquence8zz ( customize eloquence8 and eloquence8zz as desired ) 1e. create directory for alternate instance pid files # cd /var/opt/eloquence # mkdir -p 8.zz/run # chmod 755 8.zz # chmod 1777 8.zz/run Now you use the /sbin/init.d/eloq8zz script to start the alternate server version (use /etc/init.d/eloq8zz on Linux). Usage is like the regular eloq8 script. You also need to use eloq8zz for status and stop commands as the regular eloq8 script will not "see" the instances managed by the alternate start script eloq8zz. If you want automatic startup, you may symlink the eloq8zz start script in appropriate /sbin/rc*.d entries (example for hp-ux) and configure the ELOQDB_START[x]=1 setting in either the eloquence8 or eloquence8zz instance config file, but NOT in both of them. Example (hp-ux): # ls -ld /opt/eloquence/* dr-xr-xr-x 10 bin bin 8192 Jul 15 2008 /opt/eloquence/8.0 dr-xr-xr-x 10 bin bin 8192 Jul 15 2008 /opt/eloquence/8.zz # ls -ld /etc/rc.config.d/elo* -r-xr-xr-x 1 bin bin 3381 Oct 20 16:05 /etc/rc.config.d/eloquence8 -r-xr-xr-x 1 bin bin 3381 Oct 20 16:17 /etc/rc.config.d/eloquence8zz # ls -ld /sbin/init.d/elo* -r-xr-xr-x 1 bin bin 5439 Nov 11 2008 /sbin/init.d/eloq8 -r-xr-xr-x 1 root sys 5442 Oct 20 16:13 /sbin/init.d/eloq8zz # ls -ld /var/opt/elo*/8*/* drwxrwxrwt 2 bin bin 96 Oct 20 16:06 /var/opt/eloquence/8.0/run drwxrwxrwt 2 root sys 96 Oct 20 16:18 /var/opt/eloquence/8.zz/run # /sbin/init.d/eloq8zz start sample Starting eloqdb[sample] daemon [OK] # /sbin/init.d/eloq8 status eloqsd process is not active [unused] eloqdb[eloqdb] process is not active [unused] eloqdb[sample] process is not active [unused] ! # /sbin/init.d/eloq8zz status eloqsd process is not active [unused] eloqdb[eloqdb] process is not active [unused] eloqdb[sample] process is active (pid 20514) [running] ! # /sbin/init.d/eloq8zz stop sample Stopping eloqdb[sample] daemon [OK] Note that with method #2 you have the option to remove selected eloqdb instances from the eloquence8 or eloquence8zz config file and thus make those instances only available for being started with the regular or the alternate version. This may be useful to prevent selected instances from being inadvertently started with an undesired version.