zoukankan      html  css  js  c++  java
  • Linux下安装db2V9.7

    vi /etc/hosts
    (127.0.0.1 localhost
    192.168.1.53 linux-wmv8)


    vi /etc/services
    db2inst1 50000/tcp(加在最后)

    mkdir /dbdata
    mkdir /dbdatabk
    ④解压安装包
    linux-h2rf:/mnt # unzip db2v97.zip
    ⑤安装DB2数据仓库,安装步骤如下:
    A、创建用户和用户组
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # groupadd -g 901 db2grp
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # groupadd -g 902 db2fgrp
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # groupadd -g 903 db2agrp
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # useradd -g db2grp -u 801 -d /home/db2inst1 -m -s /bin/sh db2inst1
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # useradd -g db2fgrp -u 802 -d /home/db2fenc -m -s /bin/sh db2fenc
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # useradd -g db2agrp -u 803 -d /home/db2das -m -s /bin/sh db2das
    B、db2inst1用户设置密码
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # passwd db2inst1
    Changing password for db2inst1.
    New Password:
    Bad password: it is based on a dictionary word
    Reenter New Password:
    Password changed.
    C、确认用户和用户组
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # more /etc/group |grep db2
    dialout:x:16:milo,db2inst1,db2fenc,db2das
    video:x:33:milo,db2inst1,db2fenc,db2das
    db2grp:!:901:
    db2fgrp:!:902:
    db2agrp:!:903:
    linux-h2rf:/mnt/dbdata/softwares/db2v97 # more /etc/passwd |grep db2
    db2inst1:x:801:901::/home/db2inst1:/bin/sh
    db2fenc:x:802:902::/home/db2fenc:/bin/sh
    db2das:x:803:903::/home/db2das:/bin/sh
    D、权限设置
    chown db2inst1:db2grp /dbdata –R
    chown db2inst1:db2grp /dbdatabk –R
    drwxr-xr-x 6 db2inst1 db2grp 4096 Apr 24 10:50 dbdata
    drwxr-xr-x 3 db2inst1 db2grp 4096 May 8 08:59 dbdatabk
    E、语言参数设置:
    vi /home/db2inst1/.profile
    if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
    fi
    export LANG=zh_CN.GBK
    G、安装
    linux-h2rf:/mnt/dbdata/softwares/db2v97/ese # ./db2_install -b /opt/ibm/db2/V9.7 -p ese -f NOTSAMP

    H、注册license key
    /opt/ibm/db2/V9.7/adm/db2licm -a /root/Desktop/dbdata/softwares/db2v97/db2ese_c.lic 要是mnt 就直接是mnt pwd查看绝对路径
    I、创建实例
    linux-h2rf:/opt/ibm/db2/V9.7/instance # ./dascrt -u db2das
    SQL4406W The DB2 Administration Server was started successfully.
    DBI1070I Program dascrt completed successfully.
    linux-h2rf:/opt/ibm/db2/V9.7/instance # ./db2icrt -u db2fenc db2inst1
    DBI1070I Program db2icrt completed successfully.
    linux-h2rf:/opt/ibm/db2/V9.7/instance # ./db2iauto -on db2inst1
    linux-h2rf:/opt/ibm/db2/V9.7/instance #
    允许SMS的多页分配:运行 /opt/ibm/db2/V9.7/cfg/db2ln
    J、数据库仓库启动和设置
    linux-h2rf:/opt/ibm/db2/V9.7/instance # su - db2inst1
    linux-h2rf:~> db2set DB2COMM=tcpip
    linux-h2rf:~> db2set -all
    linux-h2rf:~> db2 update dbm cfg using svcename db2inst1
    DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
    successfully.

    linux-h2rf:~> db2set DB2CODEPAGE=1386
    linux-h2rf:~> db2set DB2TERRITORY=86
    linux-h2rf:~> db2 terminate
    linux-h2rf:~> db2stop

    linux-h2rf:~> db2start
    04/15/2015 16:44:47 0 0 SQL1063N DB2START processing was successful.
    SQL1063N DB2START processing was successful.
    linux-h2rf:~> db2 create database BDW on /dbdata using codeset GBK territory CN
    linux-h2rf:~>
    DB20000I The CREATE DATABASE command completed successfully.

  • 相关阅读:
    ruby 二进制转十进制 Integer("0b101") = 5
    开始菜单和我的文档的我的图片及我的音乐变成 my pictrues 正常图标了
    ruby watir 莫名其妙的错误
    Excel SaveAS是去掉提示框
    apache && jboss安装
    ruby require include的区别
    ruby控制鼠标
    This error is raised because the column 'type' is reserved for storing the class in case of inheritance
    用正则表达式限制文本框只能输入数字,小数点,英文字母,汉字等各类代码
    ASP.NET 如何动态修改 Header 属性如添加 Meta 标签 keywords description!
  • 原文地址:https://www.cnblogs.com/dalianpai/p/11789141.html
Copyright © 2011-2022 走看看