install
You install infx on any server that has the Informix software installed on it.
infx requires Perl version 5.8 or higher. Use the command
perl -v to check your version.
requirements
infx only requires a small amount of space for the software. The total amount required for each instance will vary.
The size requirements will vary depending on the size of the instance and how much database and instance metrics you choose to store.
Space requirements:
item |
location |
approx size |
infx software |
/infx |
20mb |
service logs |
/infx/inst/*/logs |
10mb |
instance photos |
/infx/inst/*/photo |
2-5mb each |
database photos |
/infx/inst/*/photo |
1-2mb |
Throughout this guide I use
/infx to refer to the install location of the infx software. This is set at install and could be
/home/informix/infx or another location. The directory must be owner and group informix.
other items
Storage space is required by other items, such as the informix software, chunk files, database and log backups.
item |
location |
approx size |
informix software 11.5 |
/infx/sw/11.50 |
750mb |
informix software 11.7 |
/infx/sw/11.70 |
1gb |
database chunks |
/infx/inst/*/chks |
varies |
backup data files |
/infx/inst/*/backup/db |
varies |
backup log files |
/infx/inst/*/backup/logs |
varies |
install instructions
Installation must be performed as user informix.
- Transfer the infx software to your host e.g. /home/informix/tar/infx-1.0b.tar.gz
- Uncompress the archive e.g. gunzip infx-1.0b.tar.gz
- Create tmp directory e.g. mkdir /home/informix/tar/tmp
- Change directory to tmp e.g. cd /home/informix/tar/tmp
- Extract tar file to tmp directory e.g. tar xvf/home/informix/tar/infx-1.0b.tar
- Set INFORMIXDIR to an Informix software location
- run “./install.sh” and follow the prompts to install
- view the README file for further instructions
example installation
This example shows how to install infx on a Linux server that already has Informix installed. There is one sample instance on the host, created when the informix software was installed.
host |
CentOS 6.0 |
informix version |
11.70.FC4TL |
location |
/opt/IBM/informix |
instance |
ol_informix1170 |
chunk location |
/opt/IBM/informix/ol_informix1170/dbspaces |
Once you have downloaded the software from download, copy it to the server under /home/informix/tar, and follow these steps.
Prepare to run the installation.
|
$ mkdir /home/informix/infx $ gunzip infx-1.0b.tar.gz $ mkdir tmp $ cd tmp $ tar xvf ../infx-1.0b.tar infx.tar install.sh disclaimer.txt LICENSE README |
Now run the infx install command, you will be prompted through a series of questions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
$ ./install.sh This will install version 1.0b of infx, do you want to continue? 1) Yes 2) No #? 1 ...[snip license]... Do you accept the terms of the license? 1) Yes 2) No #? 1 ...[snip disclaimer]... Do you want to continue? 1) Yes 2) No #? 1 Enter install location [/infx]: /infx installing version 1.0b of infx into /infx, INFORMIXDIR=/opt/IBM/informix, continue? 1) Yes 2) No #? 1 extract software link noenv to /opt/IBM/informix link latest to /opt/IBM/informix creating default /infx/local/etc/config.ini checking for informix instances DETECT ol_informix1170: /opt/IBM/informix/etc/onconfig.ol_informix1170: OK run infx disco noenv save=yes to set up detected instances version 1.0b of infx installation complete |
At this point the infx software is installed, but infx does not know about any of the existing Informix instances.
Lines 25-27 show the result of the
infx disco command, it detected the one Informix instance on my host.
Manually re-run the discovery command, with the save=yes parameter.
|
$ /infx/scripts/infx disco noenv newinst=ol_informix1170 save=yes DETECT ol_informix1170: /opt/IBM/informix/etc/onconfig.ol_informix1170: OK INFO: creating instance ol_informix1170 server: 0 config: infx-disco.inst onconfig: none.onconfig /infx/inst/ol_informix1170/logs directory created, mode: 0755, note: instance, command and service log files /infx/inst/ol_informix1170/etc directory created, mode: 0755, note: instance specific config files /infx/inst/ol_informix1170/tmp directory created, mode: 0755, note: temporary file location /infx/inst/ol_informix1170/etc/deny-auto-start file created, mode: 660, note: DO NOT start instance automatically /infx/inst/ol_informix1170/etc/deny-auto-backup-dbs file created, mode: 660, note: DO NOT auto backup /infx/inst/ol_informix1170/etc/deny-auto-clean file created, mode: 660, note: DO NOT auto clean /infx/inst/ol_informix1170/etc/deny-auto-stop file created, mode: 660, note: DO NOT auto stop /infx/inst/ol_informix1170/etc/config.ini created |
Line 7-10 show a series of deny-auto-* files being created in the instance etc directory.
You must remove these files to have this instance included in the automatic infx functions.
Now infx is set up for this instance, it shows in the instance list.
|
$ /infx/scripts/infx list mamvps03(103.1.186.63) cpus: 4/4 mem: 0.49gb free: 0.18gb time: Tue Jan 17 14:46:19 2012 stat inst mode version up mem read write informixdir error ol_informix1170 online 11.70.FC4IE 00:33:05 0.17gb 99.77% 92.73% /opt/IBM/informix |
The infx disco command also accepts the parameter newinst=all, to save all instances on the host
We can set our shell environment for that instance.
|
$ . /infx/scripts/infxenv ol_informix1170 |
If you are using bash or ksh, add this alias to your login profile:
alias infx='. /infx/scripts/infxenv'
usage:
infxenv ol_informix1170.
This sets INFORMIXDIR, PATH and other environment variables. infx commands will now default to this instance.
List the databases.
|
$ infx dbs database space owner created flags log buff ansi alloc mb used data index scans sysadmin rootdbs informix 01/17/2012 0xFFFFD021 1 0 0 4.89 3.34 2.39 0.95 11 sysmaster rootdbs informix 01/17/2012 0xFFFFD009 1 0 0 3.78 2.69 1.64 1.05 1 sysuser rootdbs informix 01/17/2012 0xFFFFD021 1 0 0 3.01 2.01 1.31 0.70 0 sysutils rootdbs informix 01/17/2012 0xFFFFD021 1 0 0 3.11 2.02 1.32 0.70 0 |
instance configuration
This is the instance specific configuration file created by the discovery service. These settings override the default infx ones.
|
; created Tue Jan 17 16:34:29 2012 from: /home/informix/infx/etc/infx-disco.inst [infxenv] INFORMIXDIR=/opt/IBM/informix ONCONFIG=onconfig.ol_informix1170 CHKDIR=/opt/IBM/informix/ol_informix1170/dbspaces INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.ol_informix1170 [env] [template] ; |
Add additional environment variables, such as DBDATE or DBMONEY, under the
[env] section. These will be set in the environment before any informix command is run.
The README file contains more information and additional steps.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
README Instructions for installation and configuration i. Installation instructions 1. Extract software to temp directory 2. cd to temp direcrory, run './install.sh' to install 3. Run '/infx/scripts/infx disco' for instance discovery ii. Futher setup 1. Add infxenv alias to .profile/.bashrc alias infxenv='. /infx/scripts/infxenv' 2. Create /etc/init.d/infx or equiv. script to start/stop infx at boot time. Copy is in /infx/scripts/infx.d #!/bin/sh # # /etc/init.d/infx # # Informix instance stop/start # # Place in /etc/init.d or equiv. to run infxinit at server start/top # # chkconfig: 2345 60 30 # su informix -c "/infx/scripts/infxinit $*" 3. Add these lines to informix crontab to enable automatic backups and logfile cleanup 0 22 * * * /infx/scripts/infx auto noenv service=backup-dbs >>/dev/null 2>&1 0 1 1 * * /infx/scripts/infx auto noenv service=clean >>/dev/null 2>&1 4. Setup ssh keys for remote administration. See http://www.infx.me/setup-ssh-keys for more information iii. Set up Apache access, see http://www.infx.me/setup-apache 1. Apache configuration, add to httpd.conf Listen ${host}:${port} NameVirtualHost ${host}:${port} <VirtualHost ${host}:${port}> DocumentRoot /infx/www/docroot ServerName ${host} ErrorLog /infx/www/logs/infx-error.log CustomLog /infx/www/logs/infx.log common SetOutputFilter DEFLATE ScriptAlias /infx/scgi-bin/ "/infx/www/scgi-bin/" Alias /infx/ "/infx/www/docroot/" <Directory /infx/www/scgi-bin> AuthType Basic AuthName infxadmin AuthUserFile /infx/www/htpasswd Require user infxadmin </Directory> </VirtualHost> 2. Set password for infxadmin user a htpasswd -c /infx/www/htpasswd infxadmin 3. To set up Apache daemon to run as informix/informix a. Add to httpd.conf: User informix Group informix 4. Alternatively set up Apache to use suexec and only run the infx cgi as informix a. Add to httpd.conf, inside VirtualHost container SuexecUserGroup informix informix b. Change these paths in httpd.conf ScriptAlias /infx/scgi-bin/ "/var/www/infx/scgi-bin/" <Directory /var/www/infx/scgi-bin> c. relocate /infx/www/scgi-bin to /var/www/infx/scgi-bin d. owner/group informix/informix, permissions 755 e. link /var/www/infx/scgi-bin back to /infx/www/scgi-bin f. see http://www.infx.me/setup-apache for more info |
infx file locations
infx extracts to the following directories.
location |
description |
/infx/etc |
infx config files |
/infx/inst |
instance specific directories |
/infx/lib |
Perl library files |
/infx/local |
locally created infx scripts and templates |
/infx/scripts |
infx CLI utilities |
/infx/template |
infx templates |
/infx/www |
CGI utilities |
Don’t edit the config files in /infx/etc, or the template files in /infx/tempalte. Make copies under /local/local/etc or /infx/local/template and edit them there instead.
remote installation
Once infx is installed on one host, you can use infx services to install it to other hosts.
The remote host must meet the same requirements for installation i.e. Informix software installed and the infx software location created. Plus, both hosts must have the
rsync utility installed.
When ready, send the software to the remote host using the rsync command.
$ infx rsync dest=mamvps04
You can set up SSH keys between the hosts, allowing access without a password. See setup ssh keys, for details on how to generate and send keys.
You can also use this command to keep remote servers up to date with script, template and configuration changes.