Previous Next Contents

3. Installation and Configuration

NOTE: There is some overlap here with the installation instructions at Informix's site and with the Nils Myklebust's excellent HOWTO, available at the IIUG site (see Additional Resources). This is deliberate for two reasons:

  1. Hopefully, through repetition, we will make some important points.
  2. It is possible that the reader may not yet have found the other documents.

3.1 Pre-installation tasks

The examples below presume the following:

Create group informix

Most Linux distributions will have one or both of addgroup or groupadd. These programs create new user groups. If your system has a GUI tool, such as usercfg, you may use it instead. The essential information remains unchanged.

<frodo> $ groupadd -g 777 informix
or
<frodo> $ addgroup -g 777 informix

These examples create a group named informix with a GID (group ID) of 777. The GID is merely an example. You can use any GID that is not already assigned (cat /etc/group to see the assigned GIDs) or use the next available GID by not specifying one.

Only the informix user you will create in the next step should be a member of the informix group. If any other user is a member of this group, that user will be able to alter or delete any database - not a Good Idea.

Create user informix

Most Linux distributions will have one or both of adduser or useradd These programs create new users. If your system has a GUI tool, such as usercfg, you may use it instead. The essential information remains unchanged.

<frodo> $ useradd -u 777 -g informix informix
or
<frodo> $ adduser informix

The first format requires that a UID (-u 777) and and initial group (-g informix) be specified. It creates the user informix with initial group membership in the informix group and assigns this user a UID of 777. This UID is merely an example; you can use any UID not already in use (cat /etc/passwd to review the assigned UIDs). The informix user should have the informix group as its primary group; if possible, this should be the only group membership, although the user.

The second format uses adduser, which is usually (almost always, but Caldera's OpenLinux is a notable exception) an interactive shell script front-ending the useradd program. If you use this script and are prompted to specify an initial group, type informix. I recommend using useradd because it allows you to exercise more control over the whole process. See man useradd for details.

Informix-SE doesn't necessarily require that the informix user have a home directory or default shell, since it is unlikely that you will need to log in as informix, but there is no harm in doing so, either.

Informix Dynamic Server, on the other hand, does need a home directory, so creating a home directory now will eliminate one step in setting it up when IDS is released for Linux and if you anticipate installing it.

Create user dba

Create a user account named dba following the procedure in Create user informix account. This account will be used for creating and managing your databases. Two rules apply here:

  1. Never use the informix user to create a database.
  2. Do not make dba a member of the informix group. Doing so will screw the security mechanisms built into the database engine.

This user's home directory will be where databases are stored, so give some thought to its location. On my system, dba's home directory is /dbms, which physically resides on its own disk and is mounted on the root filesystem at boot time. This allows me to lose my root filesystem without munging my databases and vice-versa.

Create the installation directory

Next, you need to create a directory in which to install Informix. The Filesystem Hierachy Standard [ ftp://sunsite.unc.edu/pub/Linux/docs/fhs/fhs-2.0.tar.gz ] recommends that static, shareable files (such as documentation, libraries or other binaries) be installed to /usr or /opt. Non-system files are often installed to /usr/local. On my system, they go in /opt. You may install anywhere you like (/tmp or /dev are Not Recommended (c)).

<frodo> $ mkdir /opt/informix
<frodo> $ chown informix.informix /opt/informix
<frodo> $ chmod 755 /opt/informix

3.2 Install the Software

First set the environment variable $INFORMIXDIR to point at your installation directory:

<frodo> $ export INFORMIXDIR=/opt/informix

Next, set your path, or the installation scripts will not be able to find the branding information:

<frodo> $ export PATH=$PATH:$INFORMIXDIR/bin

Change to the directory where you saved the downloaded files and unzip them (this should not be your installation directory). If you popped for the CD-ROM, you can install directly from the CD-ROM.

<frodo> $ cd /downloads
<frodo> $ unzip informix_se___esql_c_bundle_for_linux.zip

You should wind up with three directories, ESQLC, SE and ICONNECT, each containing a tarball, ESQLC.TAR, SE.TAR and ICONNECT.TAR, respectively.

Change to your installation directory (/opt/informix in this example), The tarballs should be untarred in the following order: ESQLC, SE, ICONNECT.

ESQL/C

Untar ESQL.TAR:

<frodo> $ tar xvf /downloads/ESQLC/ESQL.TAR 

Install ESQL/C and apply the license (you will be prompted for the serial number and license key you received from Intraware):

<frodo> $ ./installesql 

SE

Untar SE.TAR:

<frodo> $ tar xvf /downloads/SE/SE.TAR 

Install SE and apply the license (you will be prompted for the serial number and license key you received from Intraware):

<frodo> $ ./installse 

ICONNECT

NOTE: This step is optional. Informix-SE will function quite well without installing Informix-CONNECT. Both SE and ESQL/C have the connectivity they need built into them. IConnect is only there to allow you to connect to an engine with an ESQL/C binary that is installed on a system that does not have SE or ESQL/C installed.

Untar ICONNECT.TAR:

<frodo> $ tar xvf /downloads/ICONNECT/ICONNECT.TAR 

Install ICONNECT and apply the license (you will be prompted for the serial number and license key you received from Intraware):

<frodo> $ ./installconn 

3.3 Post-installation

Post-installation tasks are few. They amount to telling Informix how it should run and (optionally) tweaking your TCP/IP configuration.

Configure sqlhosts file

First, make a backup copy of $INFORMIXDIR/etc/sqlhosts. If you are totally anal, you can use cp -p or cp -a to preserve time and date stamps on the original file.

After you make a copy of sqlhosts, edit the original file. You can either delete or comment out (using #) the line that reads

demo_on  onipcshm  on_hostname  on_servername

since this refers to Informix Dynamic Server, which is not yet available on Linux. The hostname must exactly match the output of uname -n, or you will get a -25591 error. Using the alias will not work. The entry should now look like

demo_se  seipcpip  frodo.hobbit.com  sqlexec

  1. Field 1 is the name of the database server.
  2. Field 2 is the communication protocol (often referred to as "nettype" in Informix's documentation)
  3. Field 3 is the name of the host running the server.
  4. Field 4 is the service name (technically, with seipcpip connections, the service name points to the engine or binary being used, in this case, sqlexec).

The seipcpip protocol uses unnamed pipes, which can only be used as a local connection protocol. I can't really think of a compelling reason not to use seipcpip, particularly in a development environment (which, by the way, is the presumption behind this release of Informix-SE). So, let me state it categorically: Unless you have a specific reason not to do so, use the seipcpip nettype for any work with Informix-SE.

3.4 Test the installation

Now that you have the preliminaries out of the way, you are ready to validate your installation. If you are not an experienced Informix user, this is best done using a regular user account.

Create a directory to hold the test database, say, dbtest, and cd into that directory. Set the environment variable $INFORMIXDIR to point to the directory where you installed Informix; similarly, set $INFORMIXSERVER to the server name you specifed in the sqlhosts file. Finally, add $INFORMIXDIR/bin to your $PATH:

<frodo> $ export INFORMIXDIR=/opt/informix
<frodo> $ export INFORMIXSERVER=demo_se
<frodo> $ export PATH=$PATH:$INFORMIXDIR/bin

The command dbaccessdemo7 will create the stores7 sample database in the current directory and copy some example queries into the directory as well.

<frodo> $ dbaccessdemo7

The command dbaccess will start a nice, screen-based interface to the engine from which you can work with the database.

<frodo> $ dbaccess

Select Query-language from the menu (just type Q) and select Choose (C). This will show you a list of queries available in the sample database. Use the cursor keys to select one of the queries that begin with sel_, press Enter twice, and you should see some output. If all of this worked, you've got Informix-SE running on your machine.

Congratulations!


Previous Next Contents