Skip to main content

Install: DB2 v11 on CentOS

DB2 Database Server v11.1.4fp5

主程式安裝
# RedHat/CentOS 6/7
yum install libaio ksh rsh-server sg3_utils pam-devel nfs-utils compat-libstdc++-33
yum install libstdc++.i686 pam-devel.i686 compat-libstdc++-33.i686

# RedHat/CentOS 8
yum install libaio ksh sg3_utils pam-devel nfs-utils
yum install libstdc++.i686 pam-devel.i686

TIP: 安裝檔裡有一個檢查相依性套件的工具 db2prereqcheck,執行後,最後下方的輸出如果沒有顯示類似的內容,就表示可以繼續執行安裝。

DBT3507E The db2prereqcheck utility failed to find the following package or file: "sg3_utils".

開始安裝

tar xzf DB2_AESE_PVU_11.1_Svr_Linux_86-64.tar.gz
cd server_aese_c/
./db2prereqcheck -i
./db2_install -f NOTSAMP

***********************************************************
Install into default directory (/opt/ibm/db2/V11.1) ? [yes/no]

yes <===

Specify one of the following keywords to install DB2 products.

SERVER
CONSV
CLIENT
RTCL

Enter "help" to redisplay product names.

Enter "quit" to exit.

***********************************************************

SERVER <===

更新 FixPack
tar xzf v11.1.4fp5_linuxx64_universal_fixpack.tar.gz
cd universal/
./db2prereqcheck -i
./installFixPack

Enter the full path of the base installation directory:

-------------------------------------------------------
/opt/ibm/db2/V11.1 <== 輸入預設安裝目錄

Do you want to choose a different installation directory for the fix pack? [yes/no]

------------------------------------------------------------------------------------
no <==

完成。

FAQ

Q: 在 Fixpack 6+ 以後版本,執行 db2prereqcheck 出現一個錯誤

Validating "ipcmni_extend kernel parameter " ...
WARNING : Requirement not matched.

A: 如果主機的 RAM 小於 128 GB,可以忽略這個;如果 RAM 大於 128 GB,在設定 kernel 參數可能發生某些數值超過限制的錯誤,這時候就必須修改開機的 kernel 參數,加上 ipcmni_extend,詳細步驟可參閱 https://access.redhat.com/solutions/4968021