Informix11.5 linux as4 u5安装
一、软件包下载
在IBM网站上注册并下载安装包:
iif.11.50.UC3DE.Linux-RHEL4.tar for iif.11.50.UC3DE.Linux-RHEL4 xmanager3.0
二、安装
1.
安装系统包openmotif-
2.2.3
-6.RHEL4.2.i386.rpm
对于 IDS 图形工具,从 CD #3 安装 OpenMotif 运行库。 将 CD #3 放入驱动器。它会自动安装。 要安装软件包,请在终端中键入以下命令:
rpm -Uvh /media/cdrom/RedHat/RPMS/openmotif-
2.2.3
-6.RHEL4.2.i386.rpm
2.
创建informix用户和组
[root@mail RPMS]# groupadd informix
[root@mail RPMS]# useradd -g informix -m informix
[root@mail RPMS]# passwd informix
Changing password for user informix.
New UNIX password:
BAD PASSWORD: it is based . a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@mail RPMS]# id informix
uid=1002(informix) gid=1003(informix) groups=1003(informix)
[root@mail RPMS]# mkdir /opt/informix
[root@mail RPMS]# chown informix:informix /opt/Informix
3.
解压软件
软件被放在/home/soft/目录下进入/opt/informix目录执行以下命令
[root@mail informix]# tar xvf /home/soft/iif.11.50.UC3DE.Linux-RHEL4.tar
4.
设置INFORMIXDIR和DISPLAY变量
export INFORMIXDIR=/opt/informix
[root@mail informix]# export DISPLAY=192.168.1.155:0.0
Windows客户端IP 192.168.1.155,使用xmanager软件把安装界面拉到客户端
5.
安装软件过程
1)
进入软件目录执行安装程序ids_install
[root@mail opt]# cd /opt/Informix
[root@mail informix]# ls
bundle.ini DBLD ids_install images README.html suite.jar
CSDK ICONNECT ids_install.command JDBC SERVER
[root@mail informix]# ./ids_install
Do you want to run installer in GUI mode [y/n] :
y
Entering GUI Mode.
Initializing InstallShield Wizard........
Launching InstallShield Wizard........
Dec 22, 2008 11:35:43 AM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
Dec 22, 2008 11:35:43 AM java.util.prefs.FileSystemPreferences$3 run
INFO: Created system preferences directory in java.home.
2)
单击next
3)
单击next
4)
选择I accept both the IBM and the non-IBM terms
5)
选择目录位置/opt/Informix(默认),单击next
不选择IConnect Version3.50,因为安装Client-SDK时IConnect Version3.50就会被自动安装
6)
单击next
是否启用角色分离,默认为no,单击next
7)
是否创建demonstration数据库服务器实例,默认为no,单击next
8)
总结界面,
9)
单击next
对话框内容如下:
Set required environment variables
Set $INFORMIXDIR to the directory where the IDS server is installed.
Set $PATH to include $INFORMIXDIR/bin
Set $INFORMIXSERVER to the name of the database server
Set $ONCONFIG to the name of the active .config configuration file.
If using a sqlhosts file other than $INFORMIXDIR/etc/sqlhosts
Set $INFORMIXSQLHOSTS
If using a locale/language other than the default
Set $CLIENT_LOCALE
Set $DB_LOCALE
Set $SERVER_LOCALE
Set $DBLANG
Prepare connectivity files
sqlhosts
/etc/hosts
/etc/services
Prepare configuration file
Set DBSERVERNAME
Set SERVERNUM
Set ROOTNAME
Set ROOTPATH
Set ROOTSIZE
Initialize database server
As informix or root, run .init
If initializing a new server for the FIRST time, run .init -i
This will overwrite any existing data, so use caution . an existing setup
For more information please refer to the IBM Informix Dynamic Server Getting Started Guide
10)
单击next
11)
单击finish
以上均为root用户登陆,操作
三、配置 IDS(以下使用informix用户登陆)
1.
设置环境
以 informix 用户身份登录,则将用户 ID 切换为 informix:
[root@mail informix]# su - informix
2.
编辑环境文件ids.env
新建一个名为 ids.env 的环境文件,例如: gedit ids.env
[informix@mail ~]$ vi ids.env
将以下命令行(总计3行)添加到 ids.env 文件:
export INFORMIXDIR=/opt/informix
export INFORMIXSERVER=demo_on
export PATH=$INFORMIXDIR/bin:$PATH
保存文件并退出编辑器。
3.
使 IDS 设置环境生效:
[informix@mail ~]$ . ./ids.env (使环境变量生效)
(键入: 点 空格 点 斜杠 ids.env)
每次需要访问该 IDS 实例时,您可以再次从此文件设置环境。
4.
创建和编辑 IDS 配置文件:
cd $INFORMIXDIR/etc
cp .config.std .config
cp sqlhosts.std sqlhosts
操作日志:
[root@mail informix]# su - informix
[informix@mail ~]$ vi ids.env
[informix@mail ~]$ vi ids.env
[informix@mail ~]$ . ./ids.env (使环境变量生效)
[informix@mail ~]$ cd $INFORMIXDIR/etc
[informix@mail etc]$ pwd
/opt/informix/etc
[informix@mail etc]$ ls
ac_config.std buildsmi glsfiles odbcinst.ini
alarmprogram.sh CLI-cr Glsfiles onconfig.std
ASF-cr ClientSDK-cr Glsfiles.installed OSLIB-cr
blduser.sh clientsdkfiles ibmifmx_security.sh plconfig.std
bldutil.sh clone IDS1150.SYS2 release_notes.png
boot
1000a
.sql cmsm.cfg.sample ids_16.png setup.odbc
boot1000.sql cnv10to1110.sql ifx_failover_callback.sh smi_6to7
boot1110.sql cnv50t60.sql IIF-cr smi_load
boot1150.sql cnv50t92.sql IIFfiles smi_unld
boot901.sql cnv94t100.sql IIFfiles.installed sm_versions.std
boot90.sql conv IM_ic_16.png sqlhosts
boot910b.sql CPLUS-cr IM_uninstall_16.png sqlhosts.cmsm.sample
boot910.sql cvtlongid7x.sql informixdir-is-insecure sqlhosts.std
boot911.sql cvtlongid914.sql install SQLI-cr
boot911u.sql cvtviotab installc sysadmin
boot912b.sql DMI-cr log_full.sh syscdcv1.sql
boot912.sql do_role_sep make-informixdir-secure syscdr.sql
boot
920a
.sql dropcdr.sql manifest.inf syscdrview.sql
boot920b.sql dummyupds messagefiles sysmaster.sql
boot
920c
.sql dummyupds100.sql Messagefiles sysuser.sql
boot920.sql ESQL-cr Messagefiles.installed sysutils.sql
boot
930a
.sql evidence.sh MSG-cr termcap
boot940.sql GENLIB-cr no_log.sh typetab
brand GLS-cr odbc.ini xpg4_is.sql
[informix@mail etc]$ cp .config.std .config
[informix@mail etc]$ cp sqlhosts.std sqlhosts
5.
编辑文件 .config,更改参数:
1)
实际配置
ROOTPATH /home/informix/dbspaces/online_root
MSGPATH /home/informix/logs/online.log
LTAPEDEV /dev/tapedev 改为 /dev/null
DBSERVERNAME 默认为 空 改为demo_on
2)
找到机器网络节点的主机名:
[informix@mail etc]$ uname -n
mail
3)
用选择的编辑器(如上所示)编辑文件 sqlhosts,更改命令行:
[informix@mail etc]$ vi sqlhosts
demo_on .ipcshm on_hostname改为mail(linux主机名) on_servername 改为demo_on(数据库服务器名)
操作日志:
修改后内容:
#**************************************************************************
#
# Licensed Material - Property Of IBM
#
# "Restricted Materials of IBM"
#
# IBM Informix Dynamic Server
# (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
#
# Title: sqlhosts.demo
# De.ion:
# Default sqlhosts file for running demos.
#
#**************************************************************************
# IANA ([url]www.iana.org[/url]) assigned port number/service names for Informix:
# sqlexec 9088/tcp
# sqlexec-ssl 9089/tcp
demo_on .ipcshm mail demo_on
demo_se seipcpip se_hostname sqlexec
6.
创建日志目录和数据空间目录
[informix@mail etc]$ mkdir /home/informix/logs
[informix@mail etc]$ mkdir /home/informix/dbspaces
[informix@mail etc]$ cd /home/informix/dbspaces/
[informix@mail dbspaces]$ touch .line_root
[informix@mail dbspaces]$ ls
online_root
[informix@mail dbspaces]$ chmod 660 .line_root
7.
启动和关闭
1)
启动并初始化配置的 IDS 实例
[informix@mail etc]$ .init -iv
This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
2)
输入y
This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
Checking group membership to determine server run mode...succeeded
Reading configuration file '/opt/informix/etc/onconfig'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Creating infos file "/opt/informix/etc/.infos.demo_on"...succeeded
Linking conf file "/opt/informix/etc/.conf.demo_on"...succeeded
Checking config parameters...succeeded
Writing to infos file...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 10570 kbytes...succeeded
Allocating 100016 kbytes for buffer pool of 2K page size...succeeded
Initializing rhead structure...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 log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Validating chunks...succeeded
Creating database partition...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Initializing DBSPACETEMP list...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Forking .mode_mon thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
操作日志:
[informix@mail dbspaces]$ cd ..
[informix@mail ~]$ .init -iv
This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
Checking group membership to determine server run mode...succeeded
Reading configuration file '/opt/informix/etc/onconfig'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Creating infos file "/opt/informix/etc/.infos.demo_on"...succeeded
Linking conf file "/opt/informix/etc/.conf.demo_on"...succeeded
Checking config parameters...succeeded
Writing to infos file...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 10570 kbytes...succeeded
Allocating 100016 kbytes for buffer pool of 2K page size...succeeded
Initializing rhead structure...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 log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Validating chunks...succeeded
Creating database partition...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Initializing DBSPACETEMP list...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Forking .mode_mon thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
[informix@mail ~]$
四、相关命令
1.
初始化环境变量
用infomix用户登陆
[informix@mail ~]$ . ./ids.env (使环境变量生效)
(键入: 点 空格 点 斜杠 ids.env)
2.
启动informix
[informix@mail ~]$ .init
3.关闭实例
onmode -ky
五、测试
1.
运行测试程序dbaccessdemo7
[informix@mail ~]$ dbaccessdemo7
DBACCESS Demonstration Database Installation .
Dropping existing stores_demo database ....
Creating stores_demo database ....
Lockmode set.
Database created.
Database closed.
Database selected.
Lockmode set.
Table created.
Table created.
Table created.
Table created.
Table created.
Table created.
Table created.
Table created.
Index created.
Table created.
Database closed.
Loading data ...
Database selected.
Lockmode set.
28 row(s) loaded.
23 row(s) loaded.
9 row(s) loaded.
74 row(s) loaded.
67 row(s) loaded.
52 row(s) loaded.
5 row(s) loaded.
7 row(s) loaded.
Statistics updated.
Permission granted.
Database closed.
Database selected.
Lockmode set.
74 row(s) loaded.
Database closed.
Database selected.
Routine executed.
Table created.
1 row(s) inserted.
Table created.
1 row(s) inserted.
1 row(s) inserted.
1 row(s) inserted.
1 row(s) inserted.
Table created.
1 row(s) inserted.
1 row(s) inserted.
1 row(s) inserted.
1 row(s) inserted.
Row type created.
Table created.
1 row(s) inserted.
Statistics updated.
Permission granted.
Database closed.
The creation of the demonstration database is now complete. The remainder
of this . copies the examples into your current directory.
Press "Y" to continue, or "N" to abort.
2.
输入y
Now copying SQL command files ....
End of DBACCESSDEMO ..
3.
进入控制程序dbaccess
[informix@mail ~]$ dbaccess
菜单栏为:
Query-language Connection Database Table Session Exit
DBACCESS: Query-language Connection Database Table Session Exit
Use SQL query language.
------------------------------------------------ Press CTRL-W for Help --------
附件:http://down.51cto.com/data/2351457
本文转自 pgmia 51CTO博客,原文链接:http://blog.51cto.com/heyiyi/121815