真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

db2v11在redhat7上安裝

1、設(shè)置主機(jī)名和修改/etc/hosts一致
hostnamectl --static set-hostname db2v11

公司主營(yíng)業(yè)務(wù):網(wǎng)站設(shè)計(jì)制作、做網(wǎng)站、移動(dòng)網(wǎng)站開(kāi)發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。成都創(chuàng)新互聯(lián)公司是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開(kāi)放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來(lái)的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來(lái)驚喜。成都創(chuàng)新互聯(lián)公司推出平泉免費(fèi)做網(wǎng)站回饋大家。

2、安裝操作系統(tǒng)依賴包
yum  install  libstdc++.so.6


3、解壓包并安裝
./db2_deinstall
安裝目錄,選擇推薦目錄即可(可以修改目錄,如果不修改/預(yù)留大小為6G)
Enter "help" to redisplay product names. --------------- 選擇安裝產(chǎn)品類型,這里選擇SERVER
Do you want to install the DB2 pureScale Feature? [yes/no] ---------------- 選擇是否安裝pureScale功能,這里選擇不安裝


4、安裝完后初始化
groupadd db2iadm1                   
groupadd db2fadm1                                         
useradd db2inst1 -G db2iadm1          
useradd db2fenc1 -G db2fadm1       
cd /opt/ibm/db2/V11.1/instance/                   
./db2icrt -a server -p 50000 -u db2fenc1 db2inst1  

5、激活license                                       
以下操作全部以db2inst1用戶執(zhí)行查看license信息                                   
db2licm -l                                   
license激活                                   
db2licm -a /usr/local/src/db2ese_c.lic
   
6、修改實(shí)例

a、修改db2nodes.cfg(可選)位置在instance用戶的$HOME/sqllib/.文件格式是:
   //主機(jī)名要與/etc/hosts 的主機(jī)名一致 或hostname命令查看


(2)  檢查services文件(多節(jié)點(diǎn)配置自動(dòng)生成多個(gè)服務(wù)端口)
vi  /etc/services 
DB2c_db2inst1   50000/tcp  // 要與dbm SVCENAME一致
 
(3) 啟動(dòng)實(shí)例: 
配置環(huán)境變量  --root用戶和db2inst1用戶
# vi ~/.bash_profile
$ vi ~/.bash_profile
./home/db2inst1/sqllib/db2profile  # 增加該行代碼
# source ~/.bash_profile
$ source ~/.bash_profile

設(shè)置服務(wù)名稱
$ db2 update dbm cfg using SVCENAME db2inst1
設(shè)置注冊(cè)變量
$ db2set DB2COMM=tcpip
啟動(dòng)實(shí)例
$ db2start

7、創(chuàng)建數(shù)據(jù)庫(kù)
[root@localhost ~]# su - db2inst1
[db2inst1@localhost ~]$ cd /opt/ibm/db2/V9.7/bin
[db2inst1@localhost bin]$ ./db2sampl


8、調(diào)整數(shù)據(jù)庫(kù)參數(shù)
db2set DB2_PARALLEL_IO=*
db2set DB2_SKIPINSERTED=YES
db2set DB2_USE_ALTERNATE_PAGE_CLEANING=YES
db2set DB2_EVALUNCOMMITTED=YES
db2set DB2_ANTIJOIN=EXTEND
db2set DB2_SKIPDELETED=YES
db2set DB2CODEPAGE=1208
 
db2 update dbm cfg using DFT_MON_BUFPOOL   on

db2 update dbm cfg using DFT_MON_LOCK   on
    
db2 update dbm cfg using DFT_MON_SORT   on
 
db2 update dbm cfg using DFT_MON_STMT   on
 
db2 update dbm cfg using DFT_MON_TABLE   on
   
db2 update dbm cfg using DFT_MON_TIMESTAMP   on
    
db2 update dbm cfg using DFT_MON_UOW   on

[db2inst1@db2v11 ~]$ db2 get dbm cfg |grep -i mon
 Transaction processor monitor name        (TP_MON_NAME) =
 Default database monitor switches
   Buffer pool                         (DFT_MON_BUFPOOL) = OFF
   Lock                                   (DFT_MON_LOCK) = OFF
   Sort                                   (DFT_MON_SORT) = OFF
   Statement                              (DFT_MON_STMT) = OFF
   Table                                 (DFT_MON_TABLE) = OFF
   Timestamp                         (DFT_MON_TIMESTAMP) = ON
   Unit of work                            (DFT_MON_UOW) = OFF
 Monitor health of instance and databases   (HEALTH_MON) = OFF
 SYSMON group name                        (SYSMON_GROUP) =
 Database monitor heap size (4KB)          (MON_HEAP_SZ) = AUTOMATIC(90)
 
授權(quán)
db2 get dbm cfg |grep -i sysmon
groupadd db2user
db2 update dbm cfg using SYSMON_GROUP db2user
db2 attach to db2inst1
db2 force applications all
db2stop force

db2 get dbm cfg |grep -i sysmon
useradd -g db2user  -d /home/dpmmon  -s /bin/bash -m  dpmmon

su  - db2inst1

db2 connet to 數(shù)據(jù)庫(kù)

db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_SERVICE_SUBCLASS TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_TABLESPACE TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_CONTAINER TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_PKG_CACHE_STMT TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_BUFFERPOOL TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.ENV_GET_SYSTEM_RESOURCES TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.ENV_GET_DB2_SYSTEM_RESOURCES TO USER dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.ENV_GET_NETWORK_RESOURCES TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_CONNECTION TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_TABLE TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_LOCKS TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_ACTIVITY TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.MON_BP_UTILIZATION TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.MON_BP_UTILIZATION TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.MON_LOCKWAITS TO user dpmmon"
db2 "grant sqladm on database to user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_FORMAT_LOCK_NAME TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_SERVICE_SUBCLASS TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.SNAPDB TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.SNAPDB_MEMORY_POOL TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.MON_LOCKWAITS TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.SNAPDBM TO user dpmmon"
db2 "GRANT SELECT ON TABLE SYSIBMADM.ENV_INST_INFO TO user dpmmon"
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.SNAP_GET_HADR TO user dpmmon"---需要在配置hadr上配置
db2 "GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_SYSTEM_RESOURCES TO user dpmmon"-----報(bào)錯(cuò),可忽略

su   -  dpmmon

if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi

db2 connect to sample
/home/db2inst1/sqllib/misc
db2 -tvf EXPLAIN.DDL
[dpmmon@db2v11 misc]$ db2 list  tables
Table/View                      Schema          Type  Creation time            
------------------------------- --------------- ----- --------------------------
ADVISE_INDEX                    DPMMON          T     2018-12-30-18.01.12.076928
ADVISE_INSTANCE                 DPMMON          T     2018-12-30-18.01.11.780594
ADVISE_MQT                      DPMMON          T     2018-12-30-18.01.12.737807
ADVISE_PARTITION                DPMMON          T     2018-12-30-18.01.13.200973
ADVISE_TABLE                    DPMMON          T     2018-12-30-18.01.13.707483
ADVISE_WORKLOAD                 DPMMON          T     2018-12-30-18.01.12.454300
EXPLAIN_ACTUALS                 DPMMON          T     2018-12-30-18.01.16.561204
EXPLAIN_ARGUMENT                DPMMON          T     2018-12-30-18.01.08.940831
EXPLAIN_DIAGNOSTIC              DPMMON          T     2018-12-30-18.01.10.379307
EXPLAIN_DIAGNOSTIC_DATA         DPMMON          T     2018-12-30-18.01.10.858547
EXPLAIN_INSTANCE                DPMMON          T     2018-12-30-18.01.07.627235
EXPLAIN_OBJECT                  DPMMON          T     2018-12-30-18.01.09.203827
EXPLAIN_OPERATOR                DPMMON          T     2018-12-30-18.01.09.322018
EXPLAIN_PREDICATE               DPMMON          T     2018-12-30-18.01.09.593889
EXPLAIN_STATEMENT               DPMMON          T     2018-12-30-18.01.08.443878
EXPLAIN_STREAM                  DPMMON          T     2018-12-30-18.01.09.938834
OBJECT_METRICS                  DPMMON          T     2018-12-30-18.01.11.477921


本文標(biāo)題:db2v11在redhat7上安裝
轉(zhuǎn)載來(lái)源:http://weahome.cn/article/jchcdg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部