Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install informix Database under rehat 6.5.How to install it

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to install the informix database under rehat 6.5.I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article, so let's learn about it.

1. Preparation before database installation 1.1. Create an informix group

Using root users to execute

Groupadd informix-g 505

Create an informix user and change the password

Useradd-u 505-g informix-d / home/informix-s / bin/bash-m informix

Passwd informix

1.2. Create a GBase 8t database installation directory

Assume that the database installation path is / home/informix/gbase

Mkdir / home/informix/gbase

Cd / home

Chmod 755 informix

Chown-Rf informix:informix / home/informix/gbase

Suppose you store the data files of the database in the / opt/dbs directory

Cd / opt

Mkdir dbs

Chown-Rf informix:informix dbs

1.3. Prepare informix user environment variables

Suppose the installation directory of 1:GBase 8t database software is / home/informix/gbase directory

Suppose the instance used by the 2:GBase 8t database is named gbaseserver

Log in to the informix user, vi .bash _ profile (edit different environment variable files according to different SHELL environments, under unix

Default is .profile file), and add the following:

Export INFORMIXSERVER=gbaseserver

Export INFORMIXDIR=/home/informix/gbase

Export ONCONFIG=onconfig.gbaseserver

Export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts.gbaseserver

Export PATH=$INFORMIXDIR/bin:/usr/bin:$ {PATH}:.

Export GL_DATE= "m/%d/%iY"

Export DATETIME= "iY-%m-%d H:%M:%S"

Export DB_LOCALE=zh_cn.GB18030-2000

Export CLIENT_LOCALE=zh_cn.GB18030-2000

Export LD_LIBRARY_PATH=$ {INFORMIXDIR} / lib:$ {INFORMIXDIR} / lib/esql:$ {INFORMIXDIR} / lib/cli

Export TERM=vt100

Export TERMCAP=$INFORMIXDIR/etc/termcap

Export INFORMIXTERM=termcap

Export DBTEMP=$INFORMIXDIR/tmp

2. GBase 8t database installation 2.1. Upload installation media

Upload the installation media to the server and extract it in a separate directory. The installation files generated after decompression are as follows:

Drwxr-xr-x 2 informix informix 4096 01-07 14:20 doc

-rwxr-xr-x 1 informix informix 282311293 01-07 14:24 ids_install

-rw-r--r--1 informix informix 1952 01-07 14:24 ids.properties

-rwxr-xr-x 1 informix informix 82285 01-07 14:24 onsecurity

2.2. Steps to install GBase 8t

Use root users to execute ids_install files for installation

3. Initialize GBase 8t database 3.1. Configure database ONCONFIG files and sqlhosts files

Assume that the data file type used by 1:GBase 8t is an operating system file (path is / opt/dbs)

Suppose 2: the ip address of the machine where the database is located is 192.168.79.10.

Suppose the listening port used by the 3:GBase 8t database is 9088

Use informix user actions:

N create a directory where data files are stored, and generate rootdbs data files

Cd / opt/dbs

Touch rootdbs

Chmod 660 rootdbs

N make a copy of the sqlhosts.std document in the $INFORMIXDIR/etc/ directory with the name specified by the $INFORMIXSQLHOSTS variable

[informix@localhost dbs] $cd ~

[informix@localhost] $. .bash _ profile

[informix@localhost ~] $cd / home/informix/gbase/

[informix@localhost gbase] $cp $INFORMIXDIR/etc/sqlhosts.std $INFORMIXSQLHOSTS

N make a copy of the onconfig.std document in the $INFORMIXDIR/etc/ directory with the name specified by the $ONCONFIG variable

Cp $INFORMIXDIR/etc/onconfig.std $INFORMIXDIR/etc/$ONCONFIG

N Edit the $INFORMIXSQLHOSTS file

Echo "$INFORMIXSERVER onsoctcp192.168.56.11 9088" > > $INFORMIXSQLHOSTS

N Edit the $ONCONFIG file

Sed-I "s # ^ ROOTPATH.*#ROOTPATH / opt/dbs/rootdbs # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ DBSERVERNAME.*#DBSERVERNAME $INFORMIXSERVER # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ TAPEDEV.*#TAPEDEV / dev/null # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ LTAPEDEV.*#LTAPEDEV / dev/null # g" $INFORMIXDIR/etc/$ONCONFIG

3.2. Initialize the database

Use the informix user to execute the initialization command:

Oninit-ivy

4. Database configuration 4.1. Create dbspace

Suppose 1: in the database, you need to create four dbspace to store data, named datadbs1 datadbs2 datadbs3 datadbs4, and each dbspace space size is 100m; logical log dbspace and physical log dbspace space size are both 1G

Assumption 2: all dbspace uses operating system files

Suppose 3: 4 temp dbspace are used in the database, each temp dbspace space size is 100m

Use informix user actions

N create operating system files in the / opt/dbs directory and modify the file properties to 660

Cd / opt/dbs

Touch plogdbs llogdbs tmpdbs1 tmpdbs2 tmpdbs3 tmpdbs4 datadbs1 datadbs2 datadbs3 datadbs4 sbspace1

Chmod 660 plogdbs llogdbs tmpdbs1 tmpdbs2 tmpdbs3 tmpdbs4 datadbs1 datadbs2 datadbs3 datadbs4 sbspace1

N add dbspace through the onspaces command

Onspaces-c-P plogdbs-p / opt/dbs/plogdbs-o 0-s 1000000

Onspaces-c-d llogdbs-p / opt/dbs/llogdbs-o 0-s 1000000

Onspaces-c-d tmpdbs1-p / opt/dbs/tmpdbs1-o 0-s 10000-t-k 8k

Onspaces-c-d tmpdbs2-p / opt/dbs/tmpdbs2-o 0-s 10000-t-k 8k

Onspaces-c-d tmpdbs3-p / opt/dbs/tmpdbs3-o 0-s 10000-t-k 8k

Onspaces-c-d tmpdbs4-p / opt/dbs/tmpdbs4-o 0-s 10000-t-k 8k

Onspaces-c-S sbspace1-p / opt/dbs/sbspace1-o 0-s 10000-k 8k

Onspaces-c-d datadbs1-p / opt/dbs/datadbs1-o 0-s 10000-k 8k

Onspaces-c-d datadbs2-p / opt/dbs/datadbs2-o 0-s 10000-k 8k

Onspaces-c-d datadbs3-p / opt/dbs/datadbs3-o 0-s 10000-k 8k

Onspaces-c-d datadbs4-p / opt/dbs/datadbs4-o 0-s 10000-k 8k

Note:

Onspaces-a-d datadbs1-p / opt/dbs/datadbs5-o 0-s 10000-k 8k

Onspaces-a datadbs1-p / opt/dbs/datadbs5-o 0-s 100000

If you need to use a bare device to store data instead of using an operating system file directly, you need to create a network device through the operating system command file in advance, and create a symbolic link to the bare device in the / opt/dbs directory, and change the property of the bare device to informix:Informix, and the access rights to 660.

4.2. Add physical log / logical log

N add physical logs in silent state (onmode-u) through the onparams command, with a size of about 1G

Use informix user actions:

Onmode-uy

The unit specified by onparams-p-s 999000-d plogdbs-y / /-s is k

N use the onparams command to add logical logs, each about 100m in size, and the logical logs are stored on llogdbs dbspace.

Use informix user actions:

The unit specified by onparams-a-d llogdbs-s 100000 / /-s is k

Execute the "onparams-a-d llogdbs-s 100000" command several times until the llogdbs space is used up to avoid space waste.

N execute onmode-m to make the database online

Use informix user Action: onmode-m

N make a database level 0 backup

Informix user actions:

Ontape-s-L 0

4.3. Optimize database parameters and restart database

N modify the $ONCONFIG file in the $INFORMIXDIR/etc directory

Use informix user actions:

Sed-I "s # ^ SBSPACENAME.*#SBSPACENAME sbspace1 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ SYSSBSPACENAME.*#SYSSBSPACENAME sbspace1 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ DBSPACETEMP.*#DBSPACETEMP tmpdbs1,tmpdbs2,tmpdbs3,tmpdbs4 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ MULTIPROCESSOR.*#MULTIPROCESSOR 1 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ VPCLASS.*#VPCLASS cpu,num=2,noage # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ CLEANERS.*#CLEANERS 32 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ LOCKS.*#LOCKS 100000 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ DEF_TABLE_LOCKMODE.*#DEF_TABLE_LOCKMODE row # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ SHMVIRTSIZE.*#SHMVIRTSIZE 326560 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ SHMADD.*#SHMADD 82656 # g" $INFORMIXDIR/etc/$ONCONFIG

Sed-I "s # ^ BUFFERPOOLsize=8K.*#BUFFERPOOLsize=8K,buffers=50000,lrus=32,lru_min_dirty=50,lru_max_dirty=60 # g" $INFORMIXDIR/etc/$ONCONFIG

N shut down the database using the informix user

Onmode-ky

N start the database using the informix user

Oninit-vy

The above is all the contents of the article "how to install informix database under rehat 6.5.Thank you for reading!" I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report