How to install Informix Dynamic server in Redhat Linux

Red Hat Enterprise Linux 4

 

 

 

 

 

For this example, the trial version of IDS version 10 (32-bit) can be downloaded using installed Firefox or Konqueror browser from “Informix product family — How to get Informix product downloads — IBM Software” page. See the Resources section “Get products and technologies” for a link. Click on Informix Dynamic Server  V11.5 Trials for getting the tar archive  Sign in with IBM ID and password may be require

 http://www.ibm.com/developerworks/downloads/im/ids/

If you are not already logged in as user root, then switch user id to root:

su –

 

Create group and user informix, and enter password:

groupadd informix useradd -g informix -m informix passwd informix

 Unpack the downloaded archive of IDS:

mkdir /opt/informix chown informix:informix /opt/informix cd /opt/informix tar xvf archivename Set environment:

export INFORMIXDIR=/opt/informix

 

Install the IDS packages:

./install_rpm -acceptlicense=yes Logout from user root:

exit

Configuring IDS

Set up the environment

If you are not already logged in as user informix, then switch user id to informix:

su – informix

 

Create an environment file called ids.env using a graphical text editor (such as gedit or kate), for example:

gedit ids.env

Or, use the famous console editor vi:

vi ids.env

Add the following lines to the ids.env file:

export INFORMIXDIR=/opt/informix export INFORMIXSERVER=demo_on export PATH=$INFORMIXDIR/bin:$PATH

Save the file and exit the editor.

Set the environment for IDS:

. ./ids.env

(type: dot blank dot slash ids.env)
Each time you need to access this IDS instance you can set the environment from this file again.

Create and edit IDS configuration files:

cd $INFORMIXDIR/etc cp onconfig.std onconfig cp sqlhosts.std sqlhosts

Edit file onconfig using the editor of choice (see above), change parameters from – to:

ROOTPATH        /dev/online_root ROOTPATH        /home/informix/dbspaces/online_root   MSGPATH         /usr/informix/online.log MSGPATH         /home/informix/logs/online.log   LTAPEDEV        /dev/tapedev LTAPEDEV        /dev/null   DBSERVERNAME DBSERVERNAME    demo_on

Find the network node hostname of the machine:

uname -n

asterix

is printed for example.

Edit file sqlhosts using the editor of choice (see above), change line from – to:

demo_on onipcshm        on_hostname     on_servername demo_on onipcshm        asterix         demo_on

(Replace the word “asterix” with the network node hostname of your machine.)

Create the logs directory:

cd mkdir logs

 

Create the root dbspace:

mkdir dbspaces cd dbspaces touch online_root chmod 660 online_root

 

Startup and shutdown

Start and initialize the configured IDS instance:

oninit -iv

prints following message:

This action will initialize IBM Informix Dynamic Server; any existing IBM Informix Dynamic Server databases will NOT be accessible – Do you wish to continue (y/n)?

If you are certain that you want to initialize this instance of IDS, type y to initialize the instance. Note, all data will be lost if the instance has been used previously.

Now IDS is running. For testing purposes, you can create the demo database by executing the script dbaccessdemo7 To access databases, the console utility dbaccess can be used.

You can shut down the IDS instance with the command:

onmode -ky

and started (without initialization) with this command:

oninit

 

IDS documentation can be read online at “IBM Informix Dynamic Server information center” page. Manuals for all Informix products in different languages can be found at “Informix library” page. See the Resources section “Learn” for links.

Configuring a raw device

The whole second disk from the example machine can be configured as a raw device. Please note all data will be lost on this disk.

The first step is to create a partition. For this, use the interactive console utility fdisk. Switch to user id root to run following commands:

fdisk /dev/hdb

For example:

The number of cylinders for this disk is set to 29651. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs    (e.g., DOS FDISK, OS/2 FDISK)   Command (m for help): m Command action    a   toggle a bootable flag    b   edit bsd disklabel    c   toggle the dos compatibility flag    d   delete a partition    l   list known partition types    m   print this menu    n   add a new partition    o   create a new empty DOS partition table    p   print the partition table    q   quit without saving changes    s   create a new empty Sun disklabel    t   change a partition’s system id    u   change display/entry units    v   verify the partition table    w   write table to disk and exit    x   extra functionality (experts only)   Command (m for help): o Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won’t be recoverable.     The number of cylinders for this disk is set to 29651. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs    (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)   Command (m for help): n Command action    e   extended    p   primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-29651, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-29651, default 29651): Using default value 29651   Command (m for help): p   Disk /dev/hdb: 15.3 GB, 15303075840 bytes 16 heads, 63 sectors/track, 29651 cylinders Units = cylinders of 1008 * 512 = 516096 bytes      Device Boot      Start         End      Blocks   Id  System /dev/hdb1               1       29651    14944072+  83  Linux   Command (m for help): w The partition table has been altered!   Calling ioctl() to re-read partition table. Syncing disks.

 

To make sure the OS is informed about the partition table changes, run this command:

partprobe

 

Once the partition /dev/hdb1 is created, its permissions must be changed for use by IDS:

chown informix:informix /dev/hdb1 chmod 660 /dev/hdb1

Note, the change of permissions may be required again after reboot of the machine. This can be done using an init script.

If you are not already logged in as user informix, then switch user id to informix:

su – informix

 

Set the environment for IDS:

. ./ids.env

(Type: dot blank dot slash ids.env)

To remember which chunks are configured, create symbolic links in the dbspaces directory:

ln -s /dev/hdb1 /home/informix/dbspaces/chunk1

 

Now we create the chunk path named ‘/home/informix/dbspaces/chunk1’ of the dbspace named ‘dbspace1’. The size of the partition in kilobytes can be found in raw ‘Blocks’ in output of ‘fdisk’ command ‘p’. It is given as parameter of option ‘-s’ and has the value 14944072 in our example. Switch to userid informix and set ids.env environment to run following commands:

onspaces -c -d dbspace1 -p /home/informix/dbspaces/chunk1 -o 0 -s 14944072

 

For testing, create the demo database in dbspace1:

dbaccessdemo7 -dbspace dbspace1

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: