RHEL6.5下DB2 V10.1 安裝
1、 解壓安裝包
[root@linuxclient ~]# tar -xvzf /mnt/hgfs/data/ibm/db2/v10.1_linuxx64_server.tar.gz
[root@linuxclient ~]# ls server/
db2 db2ckupgrade db2_deinstall db2_install db2ls db2prereqcheck db2setup installFixPack
2、 安裝
[root@linuxclient ~]# cd server/
[root@linuxclient server]# ./db2_install -b /opt/ibm/db2/V10.1 -p ESE
3、 建立使用者和組
[root@linuxclient server]# groupadd -g 901 db2iadm1
[root@linuxclient server]# groupadd -g 902 db2fadm1
[root@linuxclient server]# groupadd -g 903 dasadm1
[root@linuxclient ~]# useradd -g db2iadm1 -u 801 -s /bin/bash db2inst1
[root@linuxclient ~]# useradd -g db2fadm1 -u 802 -s /bin/bash db2fenc1
[root@linuxclient ~]# useradd -g dasadm1 -u 803 -s /bin/bash dasusr1
[root@linuxclient ~]# echo "123456" | passwd --stdin db2inst1
Changing password for user db2inst1.
passwd: all authentication tokens updated successfully.
[root@linuxclient ~]# echo "123456" | passwd --stdin db2fenc1
Changing password for user db2fenc1.
passwd: all authentication tokens updated successfully.
[root@linuxclient ~]# echo "123456" | passwd --stdin dasusr1
Changing password for user dasusr1.
passwd: all authentication tokens updated successfully.
4、 建立例項
建立管理伺服器
[root@linuxclient instance]# ./dascrt -u dasusr1
DBI1070I Program dascrt completed successfully.
建立例項
[root@linuxclient instance]# ./db2icrt -u db2fenc1 db2inst1
DBI1446I The db2icrt command is running, please wait.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2icrt.log.45873".
DBI1070I Program db2icrt completed successfully.
5、 啟動DB2
啟動管理伺服器
[root@linuxclient instance]# su - dasusr1
[dasusr1@linuxclient ~]$ db2admin start
SQL4409W The DB2 Administration Server is already active.
啟動例項
[dasusr1@linuxclient ~]$ su - db2inst1
Password:
[db2inst1@linuxclient ~]$ db2start
07/03/2015 17:40:41 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
6、 配置DB2
設定開機自動啟動
[db2inst1@linuxclient ~]$ su -
Password:
[root@linuxclient ~]# cd /opt/ibm/db2/V10.1/instance/
[root@linuxclient instance]# ./db2iauto -on db2inst1
配置網路
[root@linuxclient instance]# su - db2inst1
[db2inst1@linuxclient ~]$ db2 update dbm cfg using SVCENAME 60000
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
[db2inst1@linuxclient ~]$ db2set DB2COMM=TCPIP
7、 訪問資料庫
啟動例項
[db2inst1@linuxclient ~]$ db2start
07/03/2015 17:48:31 0 0 SQL1026N The database manager is already active.
SQL1026N The database manager is already active.
建立資料庫
[db2inst1@linuxclient ~]$ db2 create database sample using codeset utf-8 territory CN
DB20000I The CREATE DATABASE command completed successfully.
連線到資料庫
[db2inst1@linuxclient ~]$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUXX8664 10.1.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28536251/viewspace-1755242/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql5.7.17 64位rhel6.5下安裝MySql
- linux下安裝db2LinuxDB2
- RHEL6.5使用安裝光碟搭建本地YUM
- Linux下安裝DB2 9.7LinuxDB2
- [DB2]linux下安裝db2 v9.7DB2Linux
- 【ASM】Oracle ASM + 11gR2 + RHEL6.5 安裝ASMOracle
- DB2 安裝DB2
- db2 v10.1在AIX雙機上的配置DB2AI
- Ubuntu 18.04 server安裝+搭建Seacms v10.1網站UbuntuServerACM網站
- RHEL6.5安裝supervisor-3.3.1-py2.6.egg
- Linux下安裝DB2的包依賴LinuxDB2
- DB2系列之DB2安裝DB2
- db2解除安裝DB2
- Linux下安裝多個DB2副本LinuxDB2
- db2 命令列安裝DB2命令列
- DB2安裝新包DB2
- db2 客戶端安裝DB2客戶端
- jive安裝指南(DB2版)DB2
- 在AIX安裝DB2 8.2AIDB2
- linux下安裝多個版本的db2副本LinuxDB2
- Linux下DB2資料庫安裝過程詳解LinuxDB2資料庫
- DB2 v9.7的安裝解除安裝(RHE 5.4)DB2
- db2 安裝過程小結DB2
- AIX 5.3 安裝 DB2 9.7 DPFAIDB2
- db2(linux)安裝說明DB2Linux
- DB2 v101安裝和解除安裝(Windows)DB2Windows
- Suse 11 安裝 DB2 10.1 DPFDB2
- DB2(Linux 64位)安裝教程DB2Linux
- 在LINUX中解除安裝DB2LinuxDB2
- DB2資料庫的解除安裝DB2資料庫
- Linux上安裝DB2 V10LinuxDB2
- 安裝配置Oracle GoldenGate for DB2(單向)OracleGoDB2
- 【DB2】在AIX 上安裝DB2 遇到空間不足的錯誤DB2AI
- homebrew下載安裝及mysql的下載安裝MySql
- db2聯邦oracle實驗 ii的安裝DB2Oracle
- SUSE Linux9安裝db2問題LinuxDB2
- windows 下安裝Windows
- DB2傻瓜1000問(二)DB2資料庫的安裝部分DB2資料庫