The installation page described the installation of the IDS Developer Edition on a SUSE Linux system. The installation wizard did also ask you if a demo instance should be automatically created for you.
Now you will see which steps are necessary to setup your own IDS instance. The name of our instance is penguin. Walking thru the individual configuration steps make you more familiar with IDS.
Please login as user informix to create your own IDS instance.
Probably we will create additional IDS instances on the same machine in the future. So it makes sense to establish a useful directory structure that allows us to quickly switch between instances and lookup relevant data:
export PENGUIN=/home/informix/instances/penguin
mkdir -p $PENGUIN/logs
chmod 775 $PENGUIN/logs
mkdir $PENGUIN/data
chmod 770 $PENGUIN/data
mkdir $PENGUIN/backups
chmod 770 $PENGUIN/backups
The IDS instance needs a certain set of environment variables. Before creating the instance we will create an environment file that contains all necessary settings:
vi /home/informix/instances/penguin/env.sh
#!/bin/bash export INFORMIXDIR=/opt/ibm/ids/ids.dev export INFORMIXSERVER=penguin export ONCONFIG=onconfig.$INFORMIXSERVER export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts.$INFORMIXSERVER export LD_LIBRARY_PATH=$LD_IBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql export PATH=$PATH:$INFORMIXDIR/bin export PENGUIN=/home/informix/instances/$INFORMIXSERVER
The individual variables and their meaning:
After creating the file we should execute it in the current shell in order to set the necessary environment for our IDS instance:
. $PENGUIN/env.sh
Remember to use the leading dot, so that the environment variables are set in the current shell.
You might check if everything has been set correctly using the env comand:
env | egrep "^INFORMIX|^ONCONFIG|^LD_LIBRARY_PATH|^PATH|^PENGUIN"
The IDS instance communication file is commonly referred to as sqlhosts file. It contains the necessary information to connect to local and remote IDS instances. Local IDS instances will also start listener threads according to the specified protocol and port number for the respective connection names. You can create the sqlhosts file using a normal text editor:
vi $INFORMIXSQLHOSTS
#================================================= #DBSERVER PROTOCOL HOSTNAME SERVICE #================================================= penguin onsoctcp apollo 40000 penguin_drda drsoctcp apollo 40001 penguin_shm onipcshm apollo dummy
Please do not copy/paste the sqlhosts file above. This might lead to problems due to hidden control characters. Just write it off from the above example.
The individual columns and their meaning:
The IDS instance configuration file is commonly referred to as onconfig. It contains the instance configuration parameters and must be located under the $INFORMIXDIR/etc directory. There is a template file named onconfig.std that you might use as a foundation for creating your own configuration file:
cd $INFORMIXDIR/etc
cp -p onconfig.std $ONCONFIG
vi $INFORMIXDIR/etc/$ONCONFIG
touch $PENGUIN/data/rootdbs.chk1
chmod 660 $PENGUIN/data/rootdbs.chk1
ROOTPATH /home/informix/instances/penguin/data/rootdbs.chk1
MSGPATH /home/informix/instances/penguin/logs/online.log
SERVERNUM 1
DBSERVERNAME penguin
DBSERVERALIASES penguin_drda,penguin_shm
LTAPEDEV /dev/null
DUMPDIR /home/informix/instances/penguin/logs
ALARMPROGRAM /opt/ibm/ids/ids.dev/etc/alarmprogram.sh
SYSALARMPROGRAM /opt/ibm/ids/ids.dev/etc/evidence.sh
After all preparations have been done, we can initialize our IDS instance:
. /home/informix/instances/penguin/env.sh
oninit -ivy
It is important to notice that you should only use the -i option for the first initialization. After the IDS instance has been successfully initialized, you should never use the -i option again. Otherwise you will loose your instance and data because the disk space is initialized again !!
You can check for a succesful initialization using the onstat - command:
IBM Informix Dynamic Server Version 11.10.FC1DE -- On-Line -- Up 00:02:03 -- 40124 Kbytes
This status line tells you that the IDS instance is up and running (On-Line) for about 2 minutes now (00:02:03) and that it has about 40 Megabytes (40124 Kbytes) of shared memory allocated currently.
If the initialization failed, our onstat - command will return:
shared memory not initialized for INFORMIXSERVER 'penguin'
In this case you have to inspect the IDS instance message log file for further advice about what probably went wrong:
onstat --m
vi /home/informix/instances/logs/online.penguin.log
vi $(awk '/^MSGPATH/ {print $2}' $INFORMIXDIR/etc/$ONCONFIG)
Congratulations - You've successfully configured your own IDS Developer Edition.
You might add the following line to the .profile of user informix in order to automatically set the necessary environment for the demo instance as soon as you login as user informix:
. /home/informix/instances/penguin/env.sh
Remember to use the leading dot, so that the environment variables are set in the current shell.
From here you might move on to: