ChinaUnix.net
 >> ChinaUnix.net > SCO

informix for sco 的安装

作者:rzbl     发表时间:2002/02/01 02:37pm

安装INFORMIX 数据库
1、  建立informix用户、组和目录
     # scoadmin  -->"Account Manager"  或  scoadmin a
       --> "Users" --> "Add New User..."
               login:  informix
              User ID:  210
              Comment:
             Password:  <*> Set password now
          login Shell:  sh
        Networked Via:
       Home Directory:  /usr/informix   系统自动建立该目录
          Login Group:  informix
                 Create Group
     Create new Group:  informix
             Group ID:  110

2、 安装informix产品
   以root用户登录, 设置环境变量
    # stty erase ^h
    # INFORMIXDIR=/usr/informix; export INFORMIXDIR
    # PATH=$INFORMIXDIR/bin:$PATH; export PATH

   将informix光盘放入驱动器, 依次安装 SQL、ESQL、ONLINE、GLS产品,
   以下tar命令中的文件全路径名依赖于在光盘中的具体位置,仅供参考。

    # mount -o relax /dev/cd0 /mnt
    # cd $INFORMIXDIR

   对于开发环境,安装SQL开发版
    # tar xvf /mnt/SQL_DEV/SQL.TAR
    # ./installsql
   对于运行环境,安装SQL运行版
    # tar xvf /mnt/SQL_RT/SQLRT.TAR
    # ./installsqlrt

   对于运行环境,安装ESQL运行版
    # tar xvf /mnt/CONNECT/CONN.TAR
    # ./installconn
   对于开发环境,安装ESQL开发版
    # tar xvf /mnt/ESQL_C/ESQL.TAR
    # ./installesql

   安装IDS数据库服务器
    # tar xvf /mnt/IDS40/ONLINE/ONLINE.TAR
    # ./installonline

   安装全球语言支持GLS(中文集)
    # tar xvf /mnt/GLS/LS723.TAR
    # ./installzhcn

    # umount /mnt

   安装过程中输入相应的序列号及关键字, SQL和SQLRT 使用同一序列号,
   CONNECT和ESQL_C 可用同一序列号.

3、  准备原始设备磁盘空间
     # scoadmin  -->"Filesystems"  -->"Filesystem Manager"  
       或  scoadmin f
       用<tab>键选择
             Filesystem   Mount Point   Access Mode
                       ...
          *M  /dev/u      /u            read-write

     用<tab>键切换到 "Mount" 回车, 选"Remove Mount Configuration...",
     在提示画面中选[Yes], 删除 "/u" 分区的 mount 信息.

     # divvy

     显示:
  +--------------+------------+--------+---+-------------+------------+
  | Name         | Type       | New FS | # | First Block | Last Block |
  +--------------+------------+--------+---+-------------+------------+
  | boot         | EAFS       |  no    | 0 |            0|       19999|
  | swap         | NON FS     |  no    | 1 |        20000|      147999|
  | root         | HTFS       |  no    | 2 |       148000|     1247999|
  | u            | HTFS       |  no    | 3 |      1248000|     1867869|
  |              | NOT USED   |  no    | 4 |            -|           -|
  |              | NOT USED   |  no    | 5 |            -|           -|
  | recover      | NON FS     |  no    | 6 |      1867870|     1867879|
  | hd0a         | WHOLE DISK |  no    | 7 |            0|     1883975|
  +--------------+------------+--------+---+-------------+------------+
  1867880 1K blocks for divisions, 16096 1K blocks reserved for the system

n[ame]     Name or rename a division.
c[reate]   Create a new file system on this division.
t[ype]     Select or change filesystem type on new filesystems.
p[revent]  Prevent a new file system from being created on this division.
s[tart]    Start a division on a different block.
e[nd]      End a division on a different block.
r[estore]  Restore the original division table.

    Enter your choice or q to quit: c
     which division? (0 through 6)? 3
         u 所在行的 New FS 项显示为 yes

    Enter your choice or q to quit: t
     which division? (0 through 6)? 3

    Choose from the following filesystem types:      

      0. NON FS (overwrite first 64k of filesystem with zeros)
      1. AFS
      2. DTFS
      3. EAFS
      4. HTFS
      5. H51K
      6. XENIX

      Please enter your choice: 0
              u 所在行的 Type 项显示为 NON FS
   
     Enter your choice or q to quit: q

     i[nstall]Install the division set-up shown
     r[eturn]Return to the previous menu
     e[xit] Exit without installing a division table

     Please enter your choice: i

     如果root文件系统大于780MB,系统会要求建立一个大小为1059 blocks的
     scratch division,对于提示:
      Would you like a scratch division to be allocated for you? (y/n)
     键入"y"即可.

     显示 Making filesystem 完成对文件系统的修改.

4、 设备链接
       # cd /dev
      # ln /dev/ru /dev/chunk0
      # chown informix chunk0
      # chgrp informix chunk0
      # chmod 660 chunk0

      # ln /dev/rStp0 /dev/tapedev
      ( "/dev/rStp0" 数据库用的磁带机设备)

5、 改变核心参数
   # scoadmin  -->Hardware/Kernel Manager  或  scoadmin h
     按<Tab>键切换到Parameters:框中, 在[ Tune Parameters...]上回车,

       --> 16  (16.Shared data)
       将共享内存值(SHMMAX) 改为: 16384000, 最低不小于5120000.

       --> 15  (15.Semaphores)
       将其中SEMMAP、SEMMNI、SEMMNU的值适当加大.

       选择Kernel:[Relink Kernel]  重新链接核心.

   informix数据库对系统核心参数的要求值可参考随机文档:
       /usr/informix/release/en_us/0333/ONLINE_7.2
6、 informix 环境
     以 informix 用户登录,在 .profile 文件中增加:

      INFORMIXSERVER=online
      INFORMIXDIR=/usr/informix
      PATH=$PATH:$INFORMIXDIR/bin
      export INFORMIXSERVER INFORMIXDIR PATH
      LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
      CLIENT_LOCALE=zh_cn.gb
      DB_LOCALE=zh_cn.gb
      SERVER_LOCALE=zh_cn.gb
      export LD_LIBRARY_PATH CLIENT_LOCALE DB_LOCALE SERVER_LOCALE

     在 etc/sqlhosts 文件最后增加:

       online  onipcshm  local  online11

       本系统采用共享内存联接方式, 后两项不起作用.

7、  配置informix参数
   重新启动UNIX系统, 以informix用户登录
   $ onmonitor
   Parameters --> Initialize
                        DISK PARAMETERS
   Page Size  [     2] Kbyte                   Mirror[N]
   Tapedev. [/dev/tapedev ]    Block Size    [    16] Kbytes      Total Tape Size [  525000] Kbytes
   Log Tape Dev. [/dev/null                                   ]
   Block Size    [    16] Kbytes      Total Tape Size [  525000] Kbytes
   Stage Blob    [            ]

   Root Name     [rootdbs     ]             Root Size [ 2000000] Kbytes
   Primary Path  [/dev/chunk0                                  ]
                                          Root Offset [       0] Kbytes
   Mirror Path   [                                             ]
                                        Mirror Offset [       0] Kbytes
   Phy.Log Size  [  100000] Kbytes      Log.log Size  [   50000] Kbytes
                                  Number of Logical Logs [    6]
                         
   其中: Total Tape Size    磁带机容量
         Root Size          数据库用的原始设备(/dev/chunk0)尺寸
         Number of Logical Logs 不小于3.
         Phy.Log Size = ((Log.log Size) * (Number of Logical logs))/3
         Phy.Log Size + Log.log Size * Number of Logical logs =
         Root Size/4
         大约等于即可.

   按<Esc> 进入下一屏

                 SHARED MEMORY PATAMETERS (部分)

    Server Number           [       1]
    Server Name             [  online]
    Max # of Logical Logs   [      50]
    Max # of Locks          [  100000]
    Max # of Buffers        [    4000]

    Resident Shared Memory Size [ 15884] Kbytes

    其中: Server Name 与 /usr/informix/etc/sqlhosts 文件中增加行
  的第一列相同, 与环境变量INFORMIXSERVER的值相同.
  Resident Shared Memory Size 的值受锁数目 (Max # of Locks)
          和缓冲区大小 ( Max # of Buffers ) 的影响, 其值应小于 UNIX
          核心参数 SHMMAX 的值.

   按<Esc> 进入下一屏

            PERFORMANCE TUNING PARAMETERS (部分)

   Multiprocessor Machine    [N]  表示为单CPU
   CPU VPs                [   1]
   Single CPU VP             [Y]
                         
                          NETTYPE settings:
                           Protocol Threads Users VP-class
                           [ipcshm] [   1]  [ 40] [CPU]
                           [      ] [    ]  [   ] [   ]

   按<Esc> 进入下一屏, 以后各屏参数缺省值即可.

   Do you realy want to continue (y/n)? y

   按"y"确认, 数据库进行磁盘空间和共享内存初始化.

3.8  在开、关机时由操作系统自动启动、关闭INFORMIX数据库

   在/etc/rc2.d/目录下建立启动数据库文件S99informix,其内容:

     INFORMIXSERVER=online
     INFORMIXDIR=/usr/informix
     PATH=$PATH:$INFORMIXDIR/bin
     export INFORMIXSERVER INFORMIXDIR PATH
     echo "Start up Online Dynamic Server"
     oninit

   在/etc/rc0.d/目录下建立关闭数据库文件K01informix,其内容:

     INFORMIXSERVER=online
     INFORMIXDIR=/usr/informix
     PATH=$PATH:$INFORMIXDIR/bin
     export INFORMIXSERVER INFORMIXDIR PATH
     echo "Stop Online Dynamic Server"
     onmode -ky


此文章相关评论:
该文章有5个相关评论如下:(点这儿可以发表评论)
dxpthk 发表于: 2002/02/01 02:56pm
楼上总结的不错,非常好,很实用.
 
rzbl 发表于: 2002/02/01 03:36pm
谢谢!!
 
klrs 发表于: 2002/02/01 04:52pm
还不错
 
sdccf 发表于: 2002/02/01 08:04pm
确实不错!
 
sccxqf1234 发表于: 2002/02/01 09:39pm
你说的是装INFORMIX SE 还是INFROMIX ONLINE 装SE 先创建INORMIX的GROUP 和一位USER
修改USER下的./PROFILE 文件,SUER是INFORSE的话.
***********************************************************************************
INFORMIXDIR=/usr/inforse
PATH=$PATH; $INFORMIXDIR:$INFORMIX/bin
INFORMIXSERVER=pthk
DBNLS=2

 
 

Copyright © ChinaUnix.net  *  转载请注明出处及作者