IBM Informix installation on Linux

In this post we will install IBM Informix 12.10 FC16 (Developer Edition) on Linux. This is a full featured free of charge Developer version.

We will use a RedHat Enterprise Linux 8.10 VM as the basis for the installation.

Prepare the installation

We can download the tar file from IBM. The link cen be found here. We need to select “IBM Developer Edition Informix IDS 12.10.FC16W2 Linux Intel 64 bit” for “Linux for System x (64 bit)”.

Perform the installation

The installation will be run as root and create and OS user informix with the password changeme:

# create user informix
groupadd -g 1001 informix
useradd -u 1001 -g 1001 informix && echo 'informix:changeme'|chpasswd
# install required OS packages
dnf -y install ncurses-compat-libs
# start the installation
mkdir ~/informix
cd ~/informix
tar xfO /sw/informix/ibm.ids.12.10.FC16W2DE.LNX.tar ibm.ids.12.10.FC16W2DE.LNX.tar|tar xvf -
# create the silent installer response file
cat << EOF > ./inf.rsp
LICENSE_ACCEPTED=TRUE
USER_INSTALL_DIR=/opt/IBM/Informix_Software_Bundle
IAD_PASSWORD=changeme
UNIX_INSTALLTYPE_SELECT=DEFAULT
LICENSE_ACCEPTED=TRUE
USER_INSTALL_DIR=/opt/IBM/Informix_Software_Bundle
IDS_INSTALL_TYPE=TYPICAL
EOF
./ids_install -i silent -f /root/informix/inf.rsp
echo $?

Initialize the root dbspace and start the server

The following commands create the disk space for a new Informix database:

# create environment file
echo 'export ONCONFIG=onconfig.inf1' > ~informix/inf1.env
echo 'export INFORMIXDIR=/opt/IBM/Informix_Software_Bundle' >> ~informix/inf1.env
echo 'export PATH=$INFORMIXDIR/bin:$INFORMIXDIR/extend/krakatoa/jre/bin:$PATH' >> ~informix/inf1.env
echo 'export INFORMIXSERVER=inf1' >> ~informix/inf1.env
echo 'export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts' >> ~informix/inf1.env
chown informix:informix ~informix/inf1.env
echo 'source ~/inf1.env' >> ~informix/.bash_profile
# adjust the informix config file
su - informix -c 'cp /opt/IBM/Informix_Software_Bundle/etc/onconfig.std /opt/IBM/Informix_Software_Bundle/etc/onconfig.inf1'
cd /opt/IBM/Informix_Software_Bundle/etc
sed -i s/^DBSERVERNAME/'DBSERVERNAME inf1'/g onconfig.inf1
sed -i s/'\/tmp\/demo_on.rootdbs'/'\/storage\/demo_on.rootdbs'/g onconfig.inf1
sed -i s/'\/dev\/tapedev'/'\/dev\/null'/g onconfig.inf1
echo 'inf1 onsoctcp lin1.fritz.box sqlexec' > /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
chown informix:informix /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
# create the root dbspace
# if this step is missing you get the following error when initializing the disk space
# "oninit: Fatal error in shared memory initialization"
mkdir /opt/IBM/Informix_Software_Bundle/storage
chmod 766 /opt/IBM/Informix_Software_Bundle/storage
touch /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
chmod 660 /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
chown -R informix:informix /opt/IBM/Informix_Software_Bundle/storage
# no we can initialize the root dbspace and start the server
su - informix -c 'oninit -viy'
Sample Output:
[root@lin1 informix]# # create environment file
echo 'export INFORMIXDIR=/opt/IBM/Informix_Software_Bundle' >> ~informix/inf1.env
echo 'export PATH=$INFORMIXDIR/bin:$INFORMIXDIR/extend/krakatoa/jre/bin:$PATH' >> ~informix/inf1.env
echo 'export INFORMIXSERVER=inf1' >> ~informix/inf1.env
echo 'export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts' >> ~informix/inf1.env
chown informix:informix ~informix/inf1.env
echo 'source ~/inf1.env' >> ~informix/.bash_profile
# adjust the informix config file
su - informix -c 'cp /opt/IBM/Informix_Software_Bundle/etc/onconfig.std /opt/IBM/Informix_Software_Bundle/etc/onconfig.inf1'
cd /opt/IBM/Informix_Software_Bundle/etc
sed -i s/^DBSERVERNAME/'DBSERVERNAME inf1'/g onconfig.inf1
[root@lin1 informix]# echo 'export ONCONFIG=onconfig.inf1' > ~informix/inf1.env
echo 'inf1 onsoctcp lin1.fritz.box sqlexec' >> /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
chown informix:informix /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
# create the root dbspace
# if this step is missing you get the following error when initializing the disk space
# "oninit: Fatal error in shared memory initialization"
mkdir /opt/IBM/Informix_Software_Bundle/storage
chmod 766 /opt/IBM/Informix_Software_Bundle/storage
touch /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
[root@lin1 informix]# echo 'export INFORMIXDIR=/opt/IBM/Informix_Software_Bundle' >> ~informix/inf1.env
[root@lin1 informix]# echo 'export PATH=$INFORMIXDIR/bin:$INFORMIXDIR/extend/krakatoa/jre/bin:$PATH' >> ~informix/inf1.env
[root@lin1 informix]# echo 'export INFORMIXSERVER=inf1' >> ~informix/inf1.env
[root@lin1 informix]# echo 'export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts' >> ~informix/inf1.env
[root@lin1 informix]# chown informix:informix ~informix/inf1.env
[root@lin1 informix]# echo 'source ~/inf1.env' >> ~informix/.bash_profile
[root@lin1 informix]# # adjust the informix config file
[root@lin1 informix]# su - informix -c 'cp /opt/IBM/Informix_Software_Bundle/etc/onconfig.std /opt/IBM/Informix_Software_Bundle/etc/onconfig.inf1'
chmod 660 /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
chown -R informix:informix /opt/IBM/Informix_Software_Bundle/storage
# no we can initialize the root dbspace and start the server
su - informix -c 'oninit -viy'
[root@lin1 informix]# cd /opt/IBM/Informix_Software_Bundle/etc
[root@lin1 etc]# sed -i s/^DBSERVERNAME/'DBSERVERNAME inf1'/g onconfig.inf1
[root@lin1 etc]# sed -i s/'\/tmp\/demo_on.rootdbs'/'\/storage\/demo_on.rootdbs'/g onconfig.inf1
[root@lin1 etc]# echo 'inf1 onipcshm lin1.fritz.box ol_informix' > /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
[root@lin1 etc]# echo 'inf1 onsoctcp lin1.fritz.box sqlexec' >> /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
[root@lin1 etc]# chown informix:informix /opt/IBM/Informix_Software_Bundle/etc/sqlhosts
[root@lin1 etc]# # create the root dbspace
[root@lin1 etc]# # if this step is missing you get the following error when initializing the disk space
[root@lin1 etc]# # "oninit: Fatal error in shared memory initialization"
[root@lin1 etc]# mkdir /opt/IBM/Informix_Software_Bundle/storage
[root@lin1 etc]# chmod 766 /opt/IBM/Informix_Software_Bundle/storage
[root@lin1 etc]# touch /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
[root@lin1 etc]# chmod 660 /opt/IBM/Informix_Software_Bundle/storage/demo_on.rootdbs
[root@lin1 etc]# chown -R informix:informix /opt/IBM/Informix_Software_Bundle/storage
[root@lin1 etc]# # no we can initialize the root dbspace and start the server
[root@lin1 etc]# su - informix -c 'oninit -viy'
Reading configuration file '/opt/IBM/Informix_Software_Bundle/etc/onconfig.inf1'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 4310 kbytes...succeeded
Creating infos file "/opt/IBM/Informix_Software_Bundle/etc/.infos.inf1"...succeeded
Linking conf file "/opt/IBM/Informix_Software_Bundle/etc/.conf.inf1"...succeeded
Initializing rhead structure...rhlock_t 16384 (512K)... rlock_t (2656K)... Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Initializing encryption-at-rest if necessary...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'ipcshm' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Creating database partition...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating VP cache drain thread...succeeded
Creating limits manager thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
[root@lin1 etc]# 

Installing a demo database

With the following code we can create a demo database:

su - informix -c 'mkdir ~/demo
cd ~/demo
echo Y|dbaccessdemo'
Sample Output:

Connecting to the database

With a GUI tool

We can use (for example) DBeaver as a graphical tool to connect to the database:

With the DB Access utility

The DB Access utility can be started with:

su - informix -c 'dbaccess'

The tool looks like this:

Important files and directories

# installation logfile
ls -altr /opt/IBM/Informix_Software_Bundle/IBM_Informix_Software_Bundle_Install_*
# database logfiles
less /opt/IBM/Informix_Software_Bundle/tmp/online.log
less /opt/IBM/Informix_Software_Bundle/tmp/startup.inf1

Basic Administration tasks

# start the database server
su - informix -c 'oninit -v'
# stop the database server
su - informix -c 'onmode -kuy'
# check the database status
su - informix -c 'onstat'
Sample Output:
[root@lin1 ~]# su - informix -c 'oninit -v'
Reading configuration file '/opt/IBM/Informix_Software_Bundle/etc/onconfig.inf1'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 4310 kbytes...succeeded
Creating infos file "/opt/IBM/Informix_Software_Bundle/etc/.infos.inf1"...succeeded
Linking conf file "/opt/IBM/Informix_Software_Bundle/etc/.conf.inf1"...succeeded
Initializing rhead structure...rhlock_t 16384 (512K)... rlock_t (2656K)... Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Initializing encryption-at-rest if necessary...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'ipcshm' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating VP cache drain thread...succeeded
Creating limits manager thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
[root@lin1 ~]#
[root@lin1 ~]# su - informix -c 'onmode -kuy'
[root@lin1 ~]#
[root@lin1 ~]# su - informix -c 'onstat'

IBM Informix Dynamic Server Version 12.10.FC16W2DE -- On-Line -- Up 00:00:13 -- 149032 Kbytes

Userthreads
address          flags   sessid   user     tty      wait             tout locks nreads   nwrites
44eae028         ---P--D 1        informix -        0                0    0     23       11
44eae940         ---P--F 0        informix -        0                0    0     0        13
44eaf258         ---P--F 0        informix -        0                0    0     0        0
44eafb70         ---P--F 0        informix -        0                0    0     0        0
44eb0488         ---P--F 0        informix -        0                0    0     0        0
44eb0da0         ---P--F 0        informix -        0                0    0     0        0
44eb16b8         ---P--F 0        informix -        0                0    0     0        0
44eb1fd0         ---P--F 0        informix -        0                0    0     0        0
44eb28e8         ---P--F 0        informix -        0                0    0     0        0
44eb3200         ---P--- 6        informix -        0                0    0     0        0
44eb3b18         ---P--B 7        informix -        0                0    0     0        0
44eb4430         Y--P--D 8        informix -        45ea0400         0    0     455      0
44eb4d48         ---P--D 9        informix -        0                0    0     0        0
44eb5660         ---P--- 11       informix -        0                0    0     0        0
44eb5f78         ---P--D 13       informix -        0                0    0     0        0
44eb71a8         ---P--D 14       informix -        0                0    0     2        0
44eb7ac0         ---P--D 15       informix -        0                0    0     0        0
44eb83d8         ---P--D 16       informix -        0                0    0     0        0
44eb8cf0         ---P--- 28       informix -        0                0    1     31       2
44eb9608         ---P--- 27       informix -        0                0    2     327      17
44eb9f20         ---P--- 26       informix -        0                0    1     11       0
44eba838         ---P--- 29       informix -        0                0    1     1        0
44ebb150         ---P--- 30       informix -        0                0    1     70       3
 23 active, 128 total, 26 maximum concurrent

Profile
dskreads   pagreads   bufreads   %cached dskwrits   pagwrits   bufwrits   %cached
29         1420       499        94.19   22         46         14         0.00

isamtot    open       start      read       write      rewrite    delete     commit     rollbk
44         12         11         6          0          0          0          1          0

gp_read    gp_write   gp_rewrt   gp_del     gp_alloc   gp_free    gp_curs
0          0          0          0          0          0          0

ovlock     ovuserthread ovbuff     usercpu  syscpu   numckpts   flushes
0          0            0          0.39     0.05     1          1

bufwaits   lokwaits   lockreqs   deadlks    dltouts    ckpwaits   compress   seqscans
0          0          21         0          0          0          0          0

ixda-RA    idx-RA     da-RA      logrec-RA  RA-pgsused lchwaits
0          0          0          2          0          0

[root@lin1 ~]#

Useful infos

To uninstall the software you can run:

/opt/IBM/Informix_Software_Bundle/uninstall/uninstall_ids/uninstallids
echo $?
cd; rm -rf /opt/IBM ~/informix
userdel informix