国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學習啦 > 學習電腦 > 操作系統(tǒng) > Linux教程 > Linux虛擬環(huán)境下怎么搭建DB2數(shù)據(jù)庫DPF(2)

    Linux虛擬環(huán)境下怎么搭建DB2數(shù)據(jù)庫DPF(2)

    時間: 孫勝龍652 分享

    Linux虛擬環(huán)境下怎么搭建DB2數(shù)據(jù)庫DPF

      三、配置rsh

      rsh是遠程運行shell的服務.db2使用rsh服務運行啟動和停止數(shù)據(jù)庫服務器的命令,以及大部分管理命令。

      1、安裝rsh

      #yum install rsh*

      2、配置rsh的安全文件

      #vi /etc/securetty

      #add the content

      #------------------

      #rsh

      #rlogin

      #rexec

      #------------------

      3、修改rsh的配置參數(shù)/etc/xinetd.d/rsh ##在生產(chǎn)環(huán)境建議配置ssh免密登錄

      #vi /etc/xinetd.d/rsh

      service shell

      {

      socket_type = stream

      wait = no

      user = root

      log_on_success += USERID

      log_on_failure += USERID

      server = /usr/sbin/in.rshd

      disable = no

      }

      4、修改rsh的配置文件rlogin

      #vi /etc/xinetd.d/rlogin

      service login

      {

      disable = no

      socket_type = stream

      wait = no

      user = root

      log_on_success += USERID

      log_on_failure += USERID

      server = /usr/sbin/in.rlogind

      }

      4、免密登陸,實例用戶db2inst1的家目錄中創(chuàng)建.rhosts文件

      cat $HOME/.rhosts

      cbusdb01 db2inst1

      cbusdb02 db2inst1

      5、CentOS7.0需要單獨下載xinetd

      yum install xinetd #低于此版本可不下載

      6、重啟rsh服務

      service xinetd restart

      7、驗證rsh服務

      rsh cbusdb01 date

      rsh cbusdb02 date

      #db2_all echo hi 沒有返回

      yum install ksh

      四、配置時鐘服務器

      1、安裝ntp服務器

      #yum install ntp*

      # ntpdate -u 202.112.10.36

      #ntpdate cn.pool.ntp.org

      #service ntpd start

      #chkconfig ntpd on

      2、修改ntp配置

      #允許內(nèi)網(wǎng)其他機器同步時間

      restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

      #互聯(lián)網(wǎng)時間服務器

      server 210.72.145.44 perfer # 中國國家受時中心server 202.112.10.36

      # 1.cn.pool.ntp.orgserver 59.124.196.83

      # 0.asia.pool.ntp.org#允許上層時間服務器主動修改本機時間

      restrict 210.72.145.44 nomodify notrap noquery

      restrict 202.112.10.36 nomodify notrap noquery

      restrict 59.124.196.83 nomodify notrap noquery

      #外部時間服務器不可用時,以本地時間作為時間服務

      server 127.0.0.1

      fudge 127.0.0.1 stratum 10

      3、修改時區(qū)

      cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

      clock -w

      4、在節(jié)點2上配置時鐘服務器

      */5 * * * * /usr/sbin/ntpdate cbusdb01

      五、配置nfs服務

      1、yum install nfs*

      # yum install portmap rpcbind #安裝nfs客戶端

      2、配置需要共享的資源

      #vi /etc/exports

      /cbusdb *(rw,sync,no_root_squash)

      /cbusdblog *(rw,sync)

      3、啟動nfs server

      service rpcbind start

      service nfs start

      service nfslock restart

      4、導出資源

      exportfs -rv

      5、顯示NFS Server上所有的共享卷

      showmount -e

      6、在客戶端掛載共享目錄

      #mount 192.168.1.122:/cbusdb /cbusdb

      #vi /etc/fstab

      cbusdb01:/cbusdb /cbusdb nfs rw,timeo=300,retrans=5,hard,intr,bg,nolock,suid

      六、關閉selinux

      vim /etc/sysconfig/selinux

      #SELINUX=disabled

      七、測試、創(chuàng)建數(shù)據(jù)庫

      1、啟動數(shù)據(jù)庫

      #db2start

      2、創(chuàng)建數(shù)據(jù)庫

      #db2 “create db cbusdb on /cbusdblog using codeset gbk territory cn”

      上面就是在Linux虛擬化環(huán)境中搭建DB2數(shù)據(jù)庫DPF的方法介紹了,本文詳細介紹了DB2的安裝過程及搭建,不知道如何搭建的朋友趕緊學習一下吧。

    307960