自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

linux下安裝DB2的步驟

數(shù)據(jù)庫
DB2數(shù)據(jù)庫的安裝方法是大家提到的非常多的問題,在各平臺下安裝的方法都不一樣。下文對linux下安裝DB2的方法作了詳細(xì)的說明,供您參考。

如果需要在linux下安裝DB2,應(yīng)該如何安裝呢?下面就為您詳細(xì)介紹linux下安裝DB2的方法步驟,希望對您能夠有所幫助。

linux下安裝DB2的詳細(xì)步驟***步
下載db2數(shù)據(jù)包,

第二步
把下載下來的包(名稱有可能是:DB2_V81_PE_LNX_32_NLV.tar)放進(jìn)opt目錄

第三步
用命令解壓DB2_V81_PE_LNX_32_NLV.tar如下:

  1. linux:~#cd /opt  
  2. linux:/opt # tar -xvf DB2_V81_PE_LNX_32_NLV.tar 

第四步
解壓以后會有目錄名如:tar -xvf DB2_V81_PE_LNX_32_NLV,點(diǎn)擊進(jìn)去以后,可以看到有三個(gè)文件,其它一個(gè)是用指令(db2_install)安裝,另一個(gè)是圖片介面(db2setup)
切換到/opt/DB2_V81_PE_LNX_32_NLV,用指令如下:

  1. linux:~#cd /opt/DB2_V81_PE_LNX_32_NLVlinux:/opt/DB2_V81_PE_LNX_32_NLV#sh db2_install稍后會出現(xiàn)如果提示:  
  2. DB2.ADMCL      DB2 Administration Client for LINUX26  
  3. DB2.ESE        DB2 Enterprise Server Edition for LINUX26  
  4. DB2.ADCL       DB2 Application Development Client for LINUX26 

然后進(jìn)行選擇,選擇時(shí)一定要用大寫如果選擇:DB2.ESE這時(shí)它自己會執(zhí)行所有文件,執(zhí)行完以后在:/opt目錄里面會出現(xiàn):IBM
表示安裝已經(jīng)完畢
接下來,我們要?jiǎng)?chuàng)建實(shí)例和創(chuàng)建數(shù)據(jù)庫

第五步(注冊license)
要注冊license不然到時(shí)沒法創(chuàng)建數(shù)據(jù)庫,license在哪里你要自己去找一下,一般情況會出現(xiàn)在這里:

  1. /opt/IBM/db2/V8.1/adm/db2licm -a /opt/DB2_V81_PE_LNX_32_NLV/db2/license/db2ese.lic 

然后在root用戶下執(zhí)行/opt/IBM/db2/V8.1/adm/db2licm -a /opt/334_ESE_LNX26_32_NLV/db2/license/db2ese.lic

命令如下

  1. :linux:~ # /opt/IBM/db2/V8.1/adm/db2licm -a /opt/DB2_V81_PE_LNX_32_NLV /db2/license/db2ese.lic   
  2. DBI1402I License added successfully.  
  3. DBI1426I This product is now licensed for use as specified in   
  4.           the License Acceptance and License Information   
  5.           documents pertaining to the licensed copy of this   
  6.           product. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF   
  7.           THE TERMS OF THE IBM LICENSE ACCEPTANCE AND LICENSE   
  8.           INFORMATION DOCUMENTS, LOCATED IN THE FOLLOWING   
  9.           DIRECTORY: /opt/IBM/db2/V8.1/license/zh_CN.utf8 

執(zhí)行完以后如果出現(xiàn)如上提示.表現(xiàn)注冊成功

第六步 創(chuàng)建用戶組和用戶

  1. # groupadd -g 901 db2grp  
  2. # groupadd -g 902 db2fgrp  
  3. # groupadd -g 903 db2agrp# useradd -g db2grp -u 801 -d /home/db2inst1 -m -s /bin/sh db2inst1  
  4. # useradd -g db2fgrp -u 802 -d /home/db2fenc -m -s /bin/sh db2fenc  
  5. # useradd -g db2agrp -u 803 -d /home/db2das -m -s /bin/sh db2das 

第七步修改密碼

  1. # passwd db2inst1  
  2. Changing password for db2inst1.  
  3. New password:[輸入新密碼]  
  4. Re-enter new password:[再次輸入新密碼]  
  5. Password changed  

創(chuàng)建完成后,執(zhí)行如下命令,檢查用戶組和用戶是否創(chuàng)建成功。

  1. # more /etc/group |grep db2  
  2. # more /etc/passwd |grep db2 

如果顯示結(jié)果與規(guī)劃一致,則表明用戶組和用戶創(chuàng)建成功。

  1. # more /etc/group |grep db2  
  2. dialout:x:16:db2inst1,db2fenc,db2das  
  3. video:x:33:db2inst1,db2fenc,db2das  
  4. db2grp:!:901:  
  5. db2fgrp:!:902:  
  6. db2agrp:!:903:  
  7. # more /etc/passwd |grep db2  
  8. db2inst1:x:801:901::/home/db2inst1:/bin/sh  
  9. db2fenc:x:802:902::/home/db2fenc:/bin/sh  
  10. db2das:x:803:903::/home/db2das:/bin/sh 

第八步檢查DB2相關(guān)用戶
執(zhí)行如下命令,檢查DB2相關(guān)的用戶組是否創(chuàng)建。

  1. # more /etc/group |grep db2 


執(zhí)行如下命令,檢查DB2相關(guān)的用戶是否創(chuàng)建。

  1. # more /etc/passwd |grep db2 

第九步創(chuàng)建實(shí)例。
1. 進(jìn)入/opt/ibm/db2/V8.1/instance目錄

  1. # cd /opt/ibm/db2/V8.1/instance 

2. 執(zhí)行以下命令

  1. # ./dascrt -u db2das  
  2. # ./db2icrt -u db2fenc db2inst1 

第十步 配置DB2
步驟 1 設(shè)置DB2自啟動(dòng)。
使用root用戶執(zhí)行以下命令:

  1. # cd /opt/ibm/db2/V9.1/instance  
  2. # ./db2iauto -on db2inst1 

步驟 2 執(zhí)行如下命令,切換到db2inst1用戶。

  1. # su - db2inst1 

步驟 3 修改DB2的服務(wù)端口為50110。

  1. db2inst1@masa:~> db2 update dbm cfg using SVCENAME 50110 

DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
步驟 4 修改DB2連接方式為TCPIP。

  1. db2inst1@masa:~> db2set DB2COMM=TCPIP 

----結(jié)束

第十一步啟動(dòng)與關(guān)閉數(shù)據(jù)庫實(shí)例
啟動(dòng)數(shù)據(jù)庫實(shí)例
在db2inst1用戶,執(zhí)行db2start啟動(dòng)數(shù)據(jù)庫實(shí)例,系統(tǒng)輸出如下所示。

  1. db2inst1@linux:~> db2start 

SQL1063N DB2START processing was successful.
關(guān)閉數(shù)據(jù)庫實(shí)例
步驟 1 在db2inst1用戶下執(zhí)行如下命令,強(qiáng)制關(guān)閉所有連接。

  1. db2inst1@linux:~> db2 force applications all 

步驟 2 執(zhí)行如下命令,關(guān)閉數(shù)據(jù)庫實(shí)例。

  1. db2inst1@linux:~> db2stop 

系統(tǒng)輸出如下所示信息。
SQL1064N DB2STOP processing was successful.
----結(jié)束

  1. linux:~> su - db2ins1   
  2. linux:~> cd   
  3. db2inst1@linux:~> db2 create database mydatab   
  4. DB20000I The CREATE DATABASE command completed successfully.  

數(shù)據(jù)庫創(chuàng)建成功了。

 

 

 

【編輯推薦】

DB2性能優(yōu)化的十大注意事項(xiàng)

DB2動(dòng)態(tài)SQL的查看方法

帶您了解DB2索引結(jié)構(gòu)

帶您深入了解DB2物化查詢表

兩種DB2分區(qū)數(shù)據(jù)庫恢復(fù)方式

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-08-16 11:00:29

DB2 PE

2010-11-01 13:34:20

DB2數(shù)據(jù)庫安裝

2010-08-11 13:18:40

安裝DB2數(shù)據(jù)庫

2010-01-07 11:08:56

Ubuntu DB2

2023-09-27 09:23:56

Linux操作系統(tǒng)

2009-12-16 10:43:52

安裝db2

2010-08-26 16:00:31

DB2數(shù)據(jù)庫安裝

2010-08-11 11:13:27

DB2 pe

2010-07-29 10:12:03

DB2 PE

2010-08-27 15:26:19

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

2010-08-13 09:31:54

DB2數(shù)據(jù)庫遷移

2010-08-16 14:16:28

DB2實(shí)例

2010-08-03 11:05:07

DB2 Persona

2010-08-16 17:07:43

DB2 trc

2010-08-13 09:18:30

DB2數(shù)據(jù)庫遷移

2010-08-03 13:56:11

DB2表復(fù)制

2011-03-11 16:02:03

DB2數(shù)據(jù)庫安裝

2010-08-18 15:14:08

DB2恢復(fù)命令

2010-08-03 09:32:19

DB2在線備份

2009-05-25 13:52:11

LinuxUNIXDB2數(shù)據(jù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號