Informix 9.40uc9 on Redhat Linux as 4 installation notes

Source: Internet
Author: User
Tags informix

Informix has always been relatively unavailable. Due to a project relationship, it has to be installed and used. Previously, it was mainly used for Oracle. This installation of Informix was also the first one.

I. Prepare Media
RedHat Linux as 4 has four disks, which can be downloaded from the Internet. Informix 9.40uc9 is a tar file and does not compress around 544m.

Ii. InstallationRedHat Linux as 4There is nothing to say. The graphic interface is smooth all the way.

3. Install Informix

Find an installation guide online.

× Prepare the Informix Environment

Create user INFORMIX and specify user group Informix: useradd-D/home/Informix-M Informix

* Switch to the user environment and modify Environment Variables
Vi. bash_profile, add the following parameter configuration, in order to ensure compatibility with special Chinese characters, I use the character set of GB18030-2000 here.

Informixdir =/u1/Informix; export informixdir
Informixserver = cs_dbs; export informixserver
Onconfig = onconfig. CS; export onconfig
Dbdate = y4md-; export dbdate
LD_LIBRARY_PATH = $ informixdir/lib: $ informixdir/lib/esql: $ LD_LIBRARY_PATH
Export LD_LIBRARY_PATH
 
Db_locale = zh_CN.GB18030-2000; export db_locale
Client_locale = zh_CN.GB18030-2000; export client_locale
Server_locale = zh_CN.GB18030-2000; export server_locale
Dblang = zh_CN.GB18030-2000; export dblang
 
Path = $ path: $ home/bin: $ informixdir/bin:/usr/Java/jdk1.5.0 _ 16/bin
 
Export path

× Install InformixProgram

Installation must be performed under the root user. Here, the Informix directory is installed to/u1/Informix, and chown Informix: infomix/u1/Informix is required. The installer uses tar to unbind the directory structure as follows,
Drwxr-XR-x 5 root bin 4096 dbld
Drwxr-XR-x 4 root bin 4096 iconnect
-Rwxr-XR-x 1 root bin 44265 2007-01-18 ids_install
Drwxr-XR-x 3 root bin 4096 JDBC
-RW-r -- 1 root bin 7649 readme.html
Drwxr-XR-x 3 root bin 4096 Server
Drwxr-XR-x 3 root bin 4096 svr_adm
Run./ids_install directly, prompting whether to confirm the protocol, and then selecting
IBM Informix UNIX bundle Installer
 
Installation requirements:
-A User "Informix" and a group "Informix" must be known to the system.
-This installation procedure must be run by user root.
-Approximately 770 MB disk space required initially.
-Approximately 500 mb disk space if everything is installed (50 MB
For ISA, 25 MB for JDBC ).
 
0) All products listed below
(1) IBM Informix Dynamic Server 9.40
2) IBM Informix iconnect
3) IBM Informix JDBC
4) IBM Informix server administrator
5) configure a demo IDs server (requires IDs)
 
Enter the number (s) of the products to install, separated by Spaces
(I. e. "1 2 3 "):

Install all components directly or install them one by one. The installation seems to have been decompressed directly and will soon be finished.

* Configure the environment and set parameters

1. Modify/etc/services and add the file
Sqlexe 1526/tcp
Sqlexec 1528/tcp
In this article, 1528 is the last listening port

2. Modify/etc/hosts, add IP addresses, and resolve host names.
192.168.1.43 mylinux

3. Configure the $ informixdir/etc/sqlhosts File
Cs_dbs onipcshm mylinux sqlexe
Cs_dbs_tcp onsoctcp mylinux sqlexec
4. Create a space and copy it here.
Operate with Informix users
Create a DBS directory in informixdir (easy to differentiate and pull)
First touch rootdbs logdbs phydbs blobdbs tmpdbs datadbs
Then chmod 660 *
Make sure that all DBs are in the Informix user Informix group. The permissions are 660;

5. Configure the $ informixdir/etc/onconfig. CS file, which can be directly configured as follows or modified by copying onconfig. STD.

-- rootdbs path and space
rootname rootdbs # Root dbspace name
rootpath/u1/Informix/dbs/rootdbs # path for device containing root dbspace
rootoffset 0 # offset of root dbspace into device (Kbytes)
rootsize 100000 # size of root dbspace (Kbytes)

-- The DBS space of physical logs should be 20 mb of rootdbs first;
Physdbs rootdbs # location (dbspace) of physical log
Physfile 20000 # physical log file size (Kbytes)

-- Use the default logical log
# Logical log Configuration

Logfiles 6 # Number of logical log files
Logsize 2000 # logical log size (Kbytes)

-- Change everything on the tape to/dev/null.
Tapedev/dev/null # tape device path
Tapeblk 32 # tape block size (Kbytes)
Tapesize 10240 # maximum amount of data to put on tape (Kbytes)

# Log archive tape device

ltapedev/dev/null # log tape device path
ltapeblk 32 # log tape block size (Kbytes)
ltapesize 10240 # Max amount of data to put on log tape (Kbytes)

-- Configure Database Server parameters and allocate locks and buffers based on the actual configuration of your machine;
Servernum 0 # unique ID corresponding to a online instance
Dbservername cs_dbs # Name of default Database Server
Dbserveraliases cs_dbs_tcp # list of alternate dbservernames
Nettype ipcshm, 1, 8, CPU # configure poll thread (s) for nettype
Nettype soctcp, 1, 8, net # configure poll thread (s) for nettype

Lock S 5000 # maximum number of locks
Buffers 500 # maximum number of shared Buffers
Numaiovps 2 # Number of Io VPS
Physbuff 32 # physical log buffer size (Kbytes)
Logbuff 32 # logical log buffer size (Kbytes)
Cleaners 1 # Number of buffer cleaner processes
Shmbase 0x10000000 # shared memory base address
Shm1_size 8000 # initial virtual shared memory segment size
Shmadd 8192 # size of new Shared Memory segments (Kbytes)

In addition, replace all/usr/Informix in the onconfig. CS file with/u/Informix/

× Start the database
Start the database and initialize the system table
Oninit-Ivy
Check the running status
Onstat-I, the following information is displayed, indicating that the operation is normal
IBM Informix Dynamic Server version 9.40.uc9 -- On-line -- up 7 days 08:35:51

× Optimize settings and improve database space

I am a beginner here. I have completely copied the author.
Echo "add blobdbs, tmpdbs0, phydbs, logdbs ..."
Echo "============================================== ===================="

Onspaces-C-B blobdbs-G 32-P/home/Informix/dbs/blobdbs-o 0-s 48000
Onspaces-c-d tmpdbs-T-P/home/Informix/dbs/tmpdbs-o 0-s 100000

Onspaces-c-d phydbs-P/home/Informix/dbs/phydbs-o 0-s 50200
Onspaces-c-d logdbs-P/home/Informix/dbs/logdbs-o 0-s 200000

Echo "\ nshut down server to quiescent mode ..."
Echo "============================================== ===================="
Onmode-S-y
Sleep 5

Echo "adding logical log \ n"
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 20000
Onparams-a-d logdbs-s 10000

Echo "\ narchiving Database Server please wait 20 seconds. \ n"
Echo "============================================== ===================="
Ontape-S
Sleep 5

Onmode-l
Onmode-l
Onmode-l
Onmode-l
Onmode-l
Onmode-l
Onmode-C
Sleep 10

Echo "\ ndrop the old logical log files... \ n"
Echo "============================================== ===================="
Onparams-D-L 1-y
Onparams-D-L 2-y
Onparams-D-L 3-y
Onparams-D-l 4-y
Onparams-D-l 5-y
Onparams-D-l 6-y

Echo "\ nchange physical log files, please wait about 1 minutes... \ n"
Echo "============================================== ===================="
Onparams-p-s 50000-D phydbs-y
Sleep 100

Echo "\ Nnow add more dbspaces/chunks... \ n"
Echo "============================================== ===================="

Onspaces-c-d datadbs-P/home/Informix/dbs/datadbs-o 0-s 500000

Echo "\ ntake a level 0 archive. \ n"
Echo "============================================== ===================="

Ontape-S-l 0

Echo "\ nreboot IDs... \ n"
Echo "============================================== ===================="

Onmode-ky
Oninit

Sleep 10

Echo "\ n ========================================== ========================"
Echo "well done! \ N"
Echo "============================================== ===================="

Finally, modify the onconfig. CS file.
Dbspacetemp tmpdbs # default temp dbspaces
Stop DatabaseOnmode-ky
Restart oninit

If needed, running dbaccess can create a new database, the locale of the database will be the configured GB18030-2000, but since Redhat as 4 has a built-in character set for the zh_CN.UTF-8, so it is inserted through dbaccess in the term
Or the input of the Chinese will be UTF-8 encoding, can only be seen on the server, the client will see the garbled, on the contrary, the Chinese language inserted through the client for the GB18030-2000 encoding, dbaccess access query is garbled.
If you run dbexport to export the database, it is normal to download it to Windows through FTP. If you need to view it properly on Redhat, you need to convert the encoding from GBK to UTF-8 through iconv, you can use more to view it normally.

I have not found a good solution for this dbaccess garbled problem. Modifying the lc_all and other parameters in the term has no effect.

× Modify RedHat Firewall

Add port 1528 to the firewall's allow. You can add VI/etc/sysconfig/iptables to this location.

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
: RH-Firewall-1-INPUT-[0: 0]
-A input-p tcp-m tcp -- dport 1528-J accept
-A input-J RH-Firewall-1-INPUT
-A forward-J RH-Firewall-1-INPUT

...

Then restart service iptables restart to start the firewall. The connection can be established on the client.

Iv. Client Configuration

1. Install Windows csdk and run setnet32:
In envirement, set client_locale = zh_cn.GB18030-2000, db_locale = zh_cn.GB18030-2000
Server Information settings:
IBM Informix server: cs_dbs
Hostname: 192.168.1.43
Protcolname: onsoctcp
Service name: 1528. this parameter is disgusting. It is actually the port number. If you install the Windows version, you can use a service name such as Turbo, similar to sqlexec in this article.
2. connection test
× Dbrichtool the program accesses the database through the setnet32 configuration. The connection test is successful and the support for Chinese characters is also good.
× JDBC program connection test, as if the URL is configured as follows, normal access is normal:
JDBC: Informix-sqli: // 192.168.1.43: 1528/newdb: informixserver = cs_dbs; db_locale = zh_CN.gb18030-2000; client_locale = zh_CN.gb18030-2000; newcodeset = GBK, gb18030-2000, 5488, UTF-8
The cause is that Sun JDK is encoded as GBK in files under Windows and must be configured using the newcodeset parameter.
×Ags service studio Test
This program is a bit strange. refer to an article on the Internet.ArticleAfter modifying the JDBC driver, the connection is normal.
In the connection edit window, advanced .. sets client_locale = zh_cn.GB18030-2000, db_locale = zh_cn.GB18030-2000

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.