Install informix in redhat5

Source: Internet
Author: User
Tags informix vps

 

Operating System: Red Hat Enterprise LinuxServer release 5.5

Informix version: Informix_Ultimate_11.70.UC3_LIN_x86_32_FixPack.tar

Write the local IP address and hostname to/etc/hosts.

1. Create informix users and groups

[Root @ informix ~] # Groupadd-g 1000 informix

[Root @ informix ~] # Useradd-u 1000-g informix-m informix

[Root @ informix ~] # Passwd informix

Changing password for user informix.

New UNIX password:

Bad password: it is based on a dictionary word

Retype new UNIX password:

Passwd: all authentication tokens updated successfully

[Root @ informix ~] # Id informix

Uid = 1000 (informix) gid = 1000 (informix) groups = 1000 (informix)

2. decompress the file

[Root @ informix ~] # Mkdir/usr/informix # database installation directory

[Root @ informix ~] # Chown informix: informix/usr/informix

[Root @ informix ~] # Tar xvf Informix_Ultimate_11.70.UC3_LIN_x86_32_FixPack.tar-C/usr/informix/insta

3. Install software:

By default, informix installs the software under/opt/IBM/informix. To change the directory, you can change the directory during installation or before installation.

Set the installation directory before installation:

Export INFORMIXDIR =/usr/informix

Perform the following operations as the root user:

1) Go to the Software Directory and run the installation program ids_install

[Root @ informix insta] #./ids_install

 

4. Configuration

1) set Environment Variables

Log On As an informix user

[Root @ informix ~] # Su-informix

[Informix @ informix ~] $ Vi ids. env # Add the following command lines (3 in total) to the ids. env file:

Export INFORMIXDIR =/usr/informix

Export INFORMIXSERVER = demo_on

Export PATH = $ INFORMIXDIR/bin: $ PATH

 

[Informix @ informix ~] $ Vi. bash_profile # Add

INFORMIXDIR =/usr/informix

INFORMIXSERVER = informix

PATH = $ PATH: $ HOME/bin: $ INFORMIXDIR/bin

Export PATH INFORMIXDIR INFORMIXSERVER

2) Make the setting environment effective:

[Informix @ informix ~] $ ../Ids. env

[Informix @ informix ~] $ Source. bash_profile

3) Configure onconfig and sqlhosts

Cd/$ INFORMIXDIR/etc/

Cp onconfig. std onconfig

Cp sqlhosts. std sqlhosts

 

Vi onconfig

ROOTNAME rootdbs

ROOTPATH/usr/informix/dbspaces/rootdbs

MSGPATH/usr/informix/log/online. log

SERVERNUM 1

DBSERVERNAME informix

SHMBASE 0x0000000l

TAPEDEV/dev/null

DBSPACETEMP tmpdbs

 

[Informix @ informix ~] $ Mkdir/usr/informix/dbspaces

[Informix @ informix ~] $ Mkdir/usr/informix/log

[Informix @ informix ~] $ Cd/usr/informix/dbspaces/

[Informix @ informix ~] $ Touch rootdbs

[Informix @ informix ~] $ Chmod 660 rootdbs

[Informix @ informix ~] $ Cd $ INFORMIXDIR/tmp

[Informix @ informix ~] $ Touch tmpdbs

[Informix @ informix ~] $ Chmod 660 tmpdbs

 

Vi sqlhosts # tail row Addition

Informix onsoctcp informix. hans. comsqlexec

 

[Informix @ informix ~] # Vi/etc/services

Sqlexec 9999/tcp

5. Start and close the database

1) Start

[Informix @ informix ~] $ Oninit-ivy

Startup time:

Shmget: [EEXIST] [17]: key 52564801: shared memory already exists

Log information:

10:50:13 IBM Informix Dynamic Server Started.

10:50:13 shmget: [EEXIST] [17]: key 52564801: shared memory already exists

10:50:13 mt_shm_init: can't create resident segment

My online search solution:

NETTYPE # Configure poll thread (s) for nettype-> not set for now

# NETTYPE tlitcp, 1, 20, NET # Configure poll thread (s) for nettype

 

NUMCPUVPS 1 # Number of user (cpu) vps-> temporarily changed to 1

 

BUFFERS 10000 # Maximum number of shared buffers-> temporarily reduced by 10 times to 10000

CKPTINTVL 3600 # Check point interval (in sec)-> set this to 3600 first.

Before oninit-ivy, use ipcs to check whether any informix user occupies the memory segment.

However, NUMCPUVPS and BUFFERS are not found in the onconfig file.

At the same time, I set SERVERNUM to 1, but I can see that this value is not set on another installed library.

This startup is successful.

[Informix @ informix ~] $ Oninit-ivy

Reading configuration file '/usr/informix/etc/onconfig'... succeeded

Creating/INFORMIXTMP/. infxdirs... succeeded

Checking config parameters... succeeded

Allocating and attaching to shared memory... succeeded

Creating resident pool 10596 kbytes... succeeded

Allocating 100016 kbytes for buffer pool of 2 K page size... succeeded

Creating infos file "/usr/informix/etc/. infos. informix"... succeeded

Linking conf file "/usr/informix/etc/. conf. informix"... succeeded

Initializing rhead structure... succeeded

Writing to infos file... succeeded

Initialization of Encryption... succeeded

Initializing ASF... succeeded

Initializing Dictionary Cache and SPL Routine Cache... succeeded

Bringing up adm vp... succeeded

Creating VP classes... succeeded

Onlining 0 additional cpu vps... succeeded

Onlining 2 IO vps... succeeded

Forking main_loop thread... succeeded

Initializing DR structures... succeeded

Forking 1 'ipcshm' listener threads... succeeded

Starting tracing... succeeded

Initializing 8 flushers... succeeded

Initializing SDS Server network connections... succeeded

Initializing log/checkpoint information... succeeded

Initializing dbspaces... succeeded

Opening primary chunks... succeeded

Opening mirror chunks... succeeded

Validating chunks... succeeded

Initialize Async Log Flusher... succeeded

Starting B-tree rule... succeeded

Initializing DBSPACETEMP list... succeeded

Init ReadAhead Daemon... succeeded

Checking database partition index... succeeded

Initializing dataskip structure... succeeded

Checking for temporary tables to drop... succeeded

Updating Global Row Counter... succeeded

Forking onmode_mon thread... succeeded

Creating periodic thread... succeeded

Starting scheduling system... succeeded

Verbose output complete: mode = 5

 

Run the test program dbaccessdemo7.

2) Disable

[Informix @ informix ~] $ Onmode-ky

 

When data is disabled and restarted, an error is returned.

Log information:

14:47:39 IBM Informix Dynamic Server Started.

 

Tue Aug 2 14:47:40 2011

 

14:47:40 Event alarms enabled. ALARMPROG = '/usr/informix/etc/alarmprogram. Sh'

14:47:40 Booting Language <c> from module <>

14:47:40 Loading Module <CNULL>

At 14:47:40 Booting Language <builtin> from module <>

14:47:40 Loading Module <BUILTINNULL>

14:47:46 DR: DRAUTO is 0 (Off)

14:47:46 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)

14:47:46 IBM Informix Dynamic Server Version 11.70.UC3 Software Serial Number AAA # B000000

At 14:47:46 disk initialization aborted: potential instance overwrite detected.

To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

 

14:47:46 oninit: Fatal error in shared memory initialization

 

14:47:46 IBM Informix Dynamic Server Stopped.

 

14:47:46 mt_shm_remove: WARNING: may not have removed all/correct segments

Solution:

The FULL_DISK_INIT parameter is added to 11.70 to protect the currently initialized dbspace. to initialize dbspace, you must change this parameter to 1.

This parameter is automatically changed to 0 once the initialization is successful.

You do not need to use the-I command to start it later. Simply use oninit-vy. -I only needs to be used during the first initialization ..

Set to 1.

 

Create a database:

1. Use dbaccess to enter the informix interaction environment

2. Select Database and press Enter.

3. Select Create and press Enter.

4. Enter the database name hans and press Enter.

5. Select Dbspace and press Enter.

6. Select the same tablespace as the local data database bureaudb and press Enter.

7. Select Log and press Enter.

8. Select Log and press enter (Select Log mode, and other transactions are not supported)

9. Select Exit and press Enter.

10. Select Create-new-database and press Enter.

At this time, the database should have been created.

View the tablespace of a database:

1. Use dbaccess to enter the informix interaction environment

2. Select Database and press Enter.

3. Select and press Enter.

4. Select the local data database bureaudb and press Enter.

5. Select Info and press Enter.

6. Select dBSpace and press Enter.

 

This article is from the "linux management" blog

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.