This guide provides a structured approach to installing, configuring, and managing IBM Informix Dynamic Server (IDS) on Ubuntu, covering essential steps from environment setup to routine administration tasks.
Before installing Informix, ensure your Ubuntu system meets the following requirements:
sudo apt update && sudo apt install -y build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev libgd-dev libxml2 libxml2-dev
informix user and group to own Informix files:sudo groupadd -g 3000 informix
sudo useradd -u 3000 -g 3000 -d /opt/informix -m -s /bin/bash informix
sudo passwd informix # Set a strong password
informix-11.50.UC4E.Linux-x86-64.tar.gz.sudo mkdir -p /opt/informix
sudo chown informix:informix /opt/informix
sudo -u informix tar xzf informix-*.tar.gz -C /opt/informix
sudo -u informix /opt/informix/ids_install
Follow the on-screen prompts to complete the installation. Default installation paths (e.g., /opt/informix) are recommended.Set up environment variables for the informix user to access Informix tools and scripts:
sudo -u informix vi /home/informix/.bash_profile
Add the following lines (adjust paths as needed):
export INFORMIXDIR=/opt/informix
export INFORMIXSERVER=informix_server # Unique server name (matches onconfig)
export ONCONFIG=onconfig.$INFORMIXSERVER # Configuration file name
export PATH=$INFORMIXDIR/bin:$PATH
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$LD_LIBRARY_PATH
Apply changes:
sudo -u informix source /home/informix/.bash_profile
Informix requires directories for data storage and configuration:
sudo -u informix mkdir -p /opt/informix/data
sudo -u informix touch /opt/informix/data/rootdbs # Primary dbspace
sudo chown -R informix:informix /opt/informix/data
sudo chmod 660 /opt/informix/data/rootdbs
onconfig FileCopy the default configuration file and edit critical parameters:
sudo -u informix cp $INFORMIXDIR/etc/onconfig.std $INFORMIXDIR/etc/onconfig.$INFORMIXSERVER
sudo -u informix vi $INFORMIXDIR/etc/onconfig.$INFORMIXSERVER
Key parameters to update:
ROOTNAME: Name of the root dbspace (e.g., rootdbs).ROOTPATH: Path to the root dbspace file (e.g., /opt/informix/data/rootdbs).ROOTSIZE: Initial size of the root dbspace (e.g., 30000 pages).DBSERVERNAME: Must match INFORMIXSERVER (e.g., informix_server).Edit the sqlhosts file to define connection protocols:
sudo -u informix vi $INFORMIXDIR/etc/sqlhosts
Add an entry for TCP/IP connections (adjust hostname/IP as needed):
informix_server onsoctcp localhost 9088 # Use 'onsoctcp' for TCP/IP
Update /etc/services to include the Informix service port:
echo "informix_server 9088/tcp" | sudo tee -a /etc/services
Stop any running processes and initialize the server:
sudo -u informix onmode -ky # Kill all Informix processes
sudo -u informix oninit -iv # Initialize (creates rootdbs and starts server)
Check server health and configuration:
sudo -u informix onstat -i # Server initialization status
sudo -u informix onstat - # General server status
Gracefully shut down the server:
sudo -u informix onmode -ky
Use dbaccess (command-line tool) to interact with databases:
dbaccess informix - # Connect to the default 'informix' database
Enter SQL commands (e.g., SELECT * FROM systables;) or exit with .quit.
Create a database with a specific dbspace:
CREATE DATABASE mydb IN DBSPACENAME=rootdbs;
Connect to the new database and create a table:
USE mydb;
CREATE TABLE employees (
id INT PRIMARY KEY,
name VARCHAR(50),
salary DECIMAL(10,2)
);
Use dbexport/dbimport for logical backups:
# Backup
dbexport mydb -ss # Export to 'mydb.exp' directory
# Restore
dbimport mydb -i /path/to/mydb.exp
For physical backups, use ontape (configure in onconfig).
Use onstat to monitor key metrics:
sudo -u informix onstat -g seg # Disk space usage
sudo -u informix onstat -g cpu # CPU utilization
sudo -u informix onstat -g ses # Active sessions
/opt/informix, /opt/informix/data) are owned by informix:informix with 660 permissions for data files.9088/tcp) using ufw:sudo ufw allow from 192.168.1.0/24 to any port 9088 proto tcp
sudo ufw enable
ALTER USER to update).informix user ownership of directories and correct permissions.netstat -tulnp | grep 9088).onstat - output for errors and review $INFORMIXDIR/logs for details.This guide provides a foundational workflow for managing Informix on Ubuntu. For advanced configurations (e.g., replication, high availability), refer to IBM’s official documentation.