1、Informix 安装步骤./ids_install -javahome /usr/bin/java1. 前言 本文主要描述的是在 linux 环境下的 informix 的安装配置步骤,且本实例采用的 Cook File 作为 Chunk 文件。2. 安装前准备(release 文件首先得解压 IDS 安装包之后在解压的目录中 find . name “ids_mach*”)2.1. 确认 Informix 所需的系统补丁 通过查看$INFORMIXDIR/release/en_us/0333 目录下的ids_machine_notes_11.50.txt 文件得知需要安装以下的包:liba
2、io-0.3.106libgcc-4.1.1libstdc+-4.1.1ncurses-5.5pam-0.99.6.2 采用如下指令,查看本机是否安装了上面系统补丁 rpm qa | grep 2.2. 确认 Informix 所需的内核参数 查看文件$INFORMIXDIR/release/en_us/0333/ids_machine_notes_11.50.txt,确认该平台下 Informix 所需的内核参数配置。SHMMAX: 33554432SHMMIN: 1SHMMNI: 128SHMSEG: 128SHMALL: 4194304SEMMNI: 128SEMMSL: 250SEMM
3、NS: 32000SEMOPM: 32SHMBASE 0x44000000L请参考如下步骤进行内核参数修改: 以 root 的身份登录 修改文件/etc/sysctl.conf 执行“sysctl p”,使更改生效2.3. 确认 DISK 剩余空间充足请确保磁盘剩余空间1G,由于本实例采用 cook file 作为 chunk 文件,所以建议至少大于 2G 的磁盘空间2.4. 创建 Informix 用户及组 以 root 用户执行如下指令,创建所需的 user 和 groupgroupadd informix;useradd informix g informix3. 安装 informix
4、 软件3.1. 创建安装环境在/home/informix 目录下创建 install 目录,并将 informix 的安装包放在其目录下3.2. 解压安装包tar -xvf IDS.11.50.FC5.Linux.x86.CZ5IZEN.tar3.3. 执行安装指令su rootexport INFORMIXDIR=/home/informix/ids1150 安装目录 cd /home/informix/install/./ids_install下面出现的是安装过程中需要选择的一些信息: 是否选用图形界面安装Do you want to run installer in GUI mode
5、y/n : n 确认安装选项1. Release Notes2. Installation Guide3. Launch Information Center4. Begin InstallationPlease select one of these options 4 4 确认继续执行安装Press 1 for Next, 3 to Cancel or 4 to Redisplay 1 1 确认安装版本Welcome to the InstallShield Wizard for IBM Informix Dynamic Server Version11.50 BundleThe Inst
6、allShield Wizard will install IBM Informix Dynamic Server Version 11.50Bundle on your computer.To continue, choose Next.Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay 1 1 确认接受使用许可协议并继续Press Enter to continue viewing the license agreement, or, Enter “1“ to accept the agreement, “2“ t
7、o decline it or “99“ to go back to the previous screen, “3“Print, “4“ Read Non-IBM Terms.1Press 1 for Next, 3 to Cancel or 4 to Redisplay 1 1 确认安装目录继续IBM Informix Dynamic Server Version 11.50 Bundle Install LocationPlease specify a directory or press Enter to accept the default directory.Directory N
8、ame: /home/informix/ids1150 Press 1 for Next, 3 to Cancel or 4 to Redisplay 1 1 确认安装的产品并继续Select the products you would like to install:To select/deselect a product or to change its setup type, type its number:Product Setup Type- -1. IBM Informix IConnect Version 3.50 2. x IBM Informix Client-SDK Ve
9、rsion 3.50 Typical3. x IBM Informix Dynamic Server Version 11.50 Typical4. x IBM Informix JDBC Driver Version 3.50 Other options:0. Continue installingEnter command 0 Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay 1 1 确认是否进行角色分离Do you want to enable role separation for auditing proc
10、edures? 1 - YesX 2 - NoTo select an item enter its number, or 0 when you are finished: 0 If you enable role separation, you can assign existing groups of users tospecific roles.If you do not enable role separation, the database server administratorperforms all administration tasks.Press 1 for Next,
11、2 for Previous, 3 to Cancel or 4 to Redisplay 1 1 确认是否建立 IDS 示范数据库服务器实例并继续Do you want to create an IDS demonstration database server instance? 1 - YesX 2 - NoTo select an item enter its number, or 0 when you are finished: 0 You can use a demonstration database server instance to verify that IDS isin
12、stalled correctly and that the hardware is configured correctly. You can alsoconfigure the demonstration database server instance to use it as a productioninstance.Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay 1 1 确认安装信息并继续IBM Informix Dynamic Server Version 11.50 Bundle will be in
13、stalled in thefollowing location:/home/informix/ids1150with the following features:IBM Informix Client-SDK Version 3.50IBM Informix Dynamic Server Version 11.50IBM Informix JDBC Driver Version 3.50for a total size:446.5 MBPress 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay 1 1 开始安装Instal
14、ling IBM Informix Client-SDK Version 3.50. Please wait.0 % complete10 % complete20 % complete30 % complete40 % complete50 % complete60 % complete70 % complete80 % complete90 % complete100 % complete 确认是否读安装文本并继续Press ENTER to read the text Type q to quit qPress 1 for Next, 3 to Cancel or 4 to Redisp
15、lay 1 1 确认成功安装The InstallShield Wizard has successfully installed IBM Informix Dynamic ServerVersion 11.50 Bundle. Choose Next to continue the wizard.Press 1 for Next, 3 to Cancel or 4 to Redisplay 1 11. Release Notes2. Installation Guide3. Launch Information Center4. Finish InstallationPlease selec
16、t one of these options 4 4Finishing installation.Press 3 to Finish or 4 to Redisplay 3 4. Informix 实例配置4.1. 环境变量的设置 su Informix 切换至 informix 用户 vi setenv1150 建立一个脚本写环境变量INFORMIXSERVER=pc100_ids1150INFORMIXDIR=/home/informix/ids1150INFINFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhostsONCONFIG=onconfig.$INFOR
17、MIXSERVERPATH=$INFORMIXDIR/bin:$PATHexport INFORMIXSERVER INFORMIXDIR INFORMIXSQLHOSTS ONCONFIG PATH 将脚本写到.bash_profile 中. /home/informix/setenv1150 执行. ./.bash_profile4.2. 配置 SQLHOSaobTS 文件cd ids1150/etc/cp sqlhosts.std sqlhostsvi sqlhostspc100_ids1150 onsoctcp PC100 sqlexec1注意:sqlexec1 的由来 root 下c
18、at /etc/servicessqlexec1 10001/tcp上面参数列分别代表的是实例名 协议 ip 地址/ 主机名 端口号4.3. 配置 ONCONFIG 文件cd ids1150/etc/cp onconfig.std onconfig.$INFORMIXSERVERvi onconfig.$INFORMIXSERVERROOTPATH $INFORMIXDIR/chunk/rootdbs.chkDBSERVERNAME pc100_ids1150NETTYPE soctcp,1,50,NET 非必须改MSGPATH $INFORMIXDIR/tmp/online.logLTAPE
19、DEV /dev/null4.4. 建立 chunk 目录并建立文件login as Informixmkdir $INFORMIXDIR/chunktouch $INFORMIXDIR/chunk/rootdbs.chkchmod 660 $INFORMIXDIR/chunk/rootdbs.chk4.5. 初始化实例 oninit i5. 日志的移动5.1. 分别建立一个物理的和逻辑的 chunk 文件并更改权限cd ids1150/chunk/touch plogdbs.chktouch llogdbs.chk chmod 660 plogdbs.chkchmod 660 llogdbs
20、.chk5.2. 分别建立物理和逻辑的 dbspaceonspaces -c -d plogdbs -p /home/informix/ids1150/chunk/plogdbs.chk -o 0 -s 50000onspaces -c -d llogdbs -p /home/informix/ids1150/chunk/llogdbs.chk -o 0 -s 500005.3. 移动物理日志 将物理日志从 rootdbs 下移动到 plogdbsonparams -p -s 49000 -d plogdbs5.4. 逻辑日志的增加onparams -a -d llogdbs -s 5000 注意:此操作执行 10 次,但是在最后一次的时候会报错,是因为空间已经不够了。5.5. 逻辑日志的删除 活动逻辑日志的切换onmode l注意:一直切换到自己新建的逻辑日志为止 完全检查点切换到当前日志onmode cOntape a 只有备份过后的逻辑日志才能删除 逻辑日志的删除onparams -d -l 1onparams -d -l 2onparams -d -l 3注意:1 2 3 分别代表的是逻辑日志的 number5.6. 对数据库做全备份使日志的移动生效ontape -s -L 05.7. 确认实例配置完成Dbaccessdemo demo1 dbspace datadbs