顯示具有 AIX 標籤的文章。 顯示所有文章
顯示具有 AIX 標籤的文章。 顯示所有文章

2007-04-24

[Log]DB2 Connect 8.1 Installation Note

前言:為了要連接 Mainframe 上的 DB2,所以,只好在「可愛的」AIX 上安裝 DB2 Connect Enterprise Edition,可是呢? Quick Beginnings for DB2 Connect™ Enterprise Edition 這份 Document 寫得太好了,所以害我來來回回裝了三次,還沒成功。


主題:


安裝筆記:




  1. 環境變數:

  2. # env
    LANG=en_US
    LOGIN=root
    SSH_TTY=/dev/pts/1
    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin <-- 不可以有 /usr/opt/db2_08_01 之類的相關變數
    LC__FASTMSG=true
    LOGNAME=root
    JAVA2D_USEAWTFONTS=0
    MAIL=/usr/spool/mail/root
    LOCPATH=/usr/lib/nls/loc
    USER=root
    AUTHSTATE=compat
    SHELL=/usr/bin/ksh
    ODMDIR=/etc/objrepos
    HOME=/
    SSH_CONNECTION=10.17.2.31 1026 10.16.9.150 22
    SSH_CLIENT=10.17.2.31 1026 22
    TERM=xterm
    MAILMSG=[YOU HAVE NEW MAIL]
    PWD=/
    TZ=TAIST-8
    A__z=! LOGNAME
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat

  3. 以 root(好像是廢話,不然誰能寫入 /usr 這個目錄啊?)將 tar file 從光碟上 copy 出來:

  4. # cp /cdrom/c590cml.tar /usr/opt

  5. 解開 c590cml.tar

  6. # tar xf c590cml.tar

  7. 再解開 conee.sbcs.tar

  8. # cd 035_CONEE_AIX5_3264_SBCS
    # tar xf conee.sbcs.tar

  9. 開始手動安裝

  10. # cd conee.sbcs
    # ./db2_install

    Specify one or more of the following keywords,
    separated by spaces, to install DB2 products.
    Keyword Product Description
    DB2.CONEE DB2 Connect Enterprise Edition for AIX
    DB2.ADMCL DB2 Administration Client for AIX
    DB2.ADCL DB2 Application Development Client for AIX

    Enter "help" to redisplay product names.
    Enter "quit" to exit.
    ***********************************************************
    DB2.CONEE DB2.ADMCL DB2.ADCL <-- 請手動輸入,每項中間以半形空白隔開

    [中間一堆有的沒有的訊息………]
    [省略………]

    The installation logfile can be found in /tmp/db2_install_log.434190.
    db2_install program completed successfully.
    # <-- 再出現提示符號就完成手動安裝的一半工作

  11. 建立使用者及群組










  12. 必要的使用者範例使用者範例群組
    Instance ownerdb2inst1db2iadm1
    Fenced userdb2fenc1db2fadm1
    DB2 administration server userdasusr1dasadm1


    # mkgroup id=997 dasadm1
    # mkgroup id=998 db2fadm1
    # mkgroup id=999 db2iadm1
    # mkuser id=1002 pgrp=dasadm1 groups=dasadm1 home=/home/dasusr1 dasusr1
    # mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1 home=/home/db2fenc1 db2fenc1
    # mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1 home=/home/db2inst1 db2inst1

  13. 啟動 DB2 Administration Server(DAS)

  14. # /usr/opt/db2_08_01/instance/dascrt -u dasusr1
    SQL4406W The DB2 Administration Server was started successfully.
    DBI1070I Program dascrt completed successfully.

  15. 建立 Instance


  16. # /usr/opt/db2_08_01/instance/db2icrt -a server -u db2fenc1 db2inst1
    DBI1070I Program db2icrt completed successfully.

  17. 建立 DB2 的相關檔案連結:

  18. # /usr/opt/db2_08_01/cfg/db2ln

  19. 修改 /etc/services

  20. db2cdb2 50000/tcp # DB2 Connection service Port
    db2idb2 50001/tcp # DB2 Interrupt service Port

  21. 設定 Server 相關資料

  22. # su - db2inst1
    $ db2
    db2 => update database manager configuration using svcename 50000
    DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
    successfully.
    db2 => db2stop
    DB20000I The DB2STOP command completed successfully.
    db2 => db2start
    DB20000I The DB2START command completed successfully.

  23. 設定 DB 相關資料:

  24. # su - db2inst1
    $ db2
    db2 => catalog tcpip node node_name remote xx.xx.xx.xx server xxx
    DB20000I The CATALOG TCPIP NODE command completed successfully.
    DB21056W Directory changes may not be effective until the directory cache is
    refreshed.
    db2 => catalog db db_name at node node_name authentication dcs
    DB20000I The CATALOG DATABASE command completed successfully.
    DB21056W Directory changes may not be effective until the directory cache is
    refreshed.
    db2 => terminatecs
    DB20000I The TERMINATE command completed successfully.