Overview
This document describes how to write a script that automatically starts up the Altibase server when booting in Sun Solaris.
How to automatically startup Altibase
Solaris provides an rc script that is related to the run level. These scripts reside in the /sbin directory and are symlinked to the rc scripts in the /etc directory.
The /sbin/rc# scripts exist under the /etc/rc#.d directory with matching names, which contains scripts to start and stop system processes for run levels.
File names in this directory start with K and S, K* scripts are used to kill processes, and S* scripts are used to start processes. These files are run in alphanumeric order.
In the /etc/init.d directory there are actual run control files that start or kill processes, which are hard-linked to the etc/rc#.d directory.
Steps
STEP 1
Create the /etc/alti-conf.d/alti.conf file. In this file, variables necessary for automatic operation are defined and set. The contents of this file are as follows.
ALTIBASE_HOME=/home/altibase/altibase_home ; export ALTIBASE_HOME |
|---|
If the user does not want to run the file automatically, set the value of START_ALTIBASE to 0. And when ALTIBASE_OWNER or ALTIBASE_HOME is changed, the value in this file must be modified.
STEP2
#!/sbin/sh {*}ADMIN="$ Unknown macro: {ALTIBASE_HOME}
/bin/isql -s 127.0.0.1 -u sys -p manager -sysdba"* *$ Unknown macro: {ADMIN}
<<EOF{*} |
|---|
STEP3
#!/sbin/sh ADMIN="$ Unknown macro: {ALTIBASE_HOME}
/bin/isql -s 127.0.0.1 -u sys -p manager -sysdba" *$ Unknown macro: {ADMIN}
<<EOF{*} |
|---|
STEP4
Create the /etc/init.d/altibase file.
This file is actually the file that the startup script or stop script will create a symbolic link later on. The contents of this file are as follows.#!/sbin/sh {*}echo "usage: $0 Unknown macro: {start|stop}
"* |
|---|
STEP5
Create a Hard Link of Startup Script and Shutdown Script in /etc/rc3.d Directory.
#cd /etc/rc3.d |
|---|
STEP6
Set the execution authority so that each script can be executed normally.
#cd /etc/rc3.d |
|---|
STEP7
# /etc/init.d/altibase <start:stop> |
|---|