這篇文章給大家分享的是有關(guān)如何通過(guò)克隆方式安裝Oracle數(shù)據(jù)庫(kù)軟件的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。
創(chuàng)新互聯(lián)公司是一家專業(yè)提供寧武企業(yè)網(wǎng)站建設(shè),專注與做網(wǎng)站、成都網(wǎng)站建設(shè)、H5建站、小程序制作等業(yè)務(wù)。10年已為寧武眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)公司優(yōu)惠進(jìn)行中。
有時(shí)候,如果幾個(gè)機(jī)器的配置相似,就不需要一遍又一遍地安裝數(shù)據(jù)庫(kù)軟件了。這種情況下可以采用克隆安裝的方式,比圖形界面和靜默安裝更快捷。
源主機(jī):A機(jī)
目標(biāo)主機(jī):B機(jī)
1. B機(jī)創(chuàng)建用戶和用戶組
#groupadd –g 501 oinstall
#groupadd –g 502 dba
#groupadd -g 503 oper
#useradd -g oinstall -G dba,oper -u 501 -d /home/oracle oracle
參數(shù)說(shuō)明 -g 指定用戶組
-G 指定附加組
-d 指定用戶目錄
激活oracle用戶(修改oracle用戶密碼)
#passwd oracle
2. B機(jī)創(chuàng)建數(shù)據(jù)庫(kù)安裝目錄并分配權(quán)限
# mkdir -p /u01/app/oracle/product/11.2.0/db_1
# chown -R oracle:oinstall /u01
# chown -R oracle:oinstall /oradata
# chown -R oracle:oinstall /backup
# chown -R oracle:oinstall /archivelog
#chmod –R 775 /u01
#chmod –R 775 /oradata
#chmod –R 775 /backup
#chmod –R 775 /archivelog
注:在通常的生產(chǎn)環(huán)境中,我們將數(shù)據(jù)庫(kù)軟件(ORACLE_HOME)安裝在本地,將數(shù)據(jù)(oradata/backup/archivelog)安裝在存儲(chǔ)中
3. 檢查B機(jī)修改內(nèi)核參數(shù)與A機(jī)一致
# vi /etc/sysctl.conf
4. 檢查B機(jī)修改用戶限制文件與A機(jī)一致
# vi /etc/security/limits.conf
5. 檢查B機(jī)修改Oracle環(huán)境變量與A機(jī)一致(oracle用戶)
$ vi .bash_pfile
6. B機(jī)安裝相應(yīng)需求包
#yum install -y binutils compat* elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC-devel libaio-devel ksh
A機(jī)操作:
1. 關(guān)閉數(shù)據(jù)庫(kù)
$ sqlplus / as sysdba
SQL> shutdown immediate;
2. 關(guān)閉監(jiān)聽(tīng)
$ lsnrctl stop
3. 打包/u01/app/oracle/product/目錄
$ cd /u01/app/oracle
$ tar -cvf /u01/app/oracle/product.tar product/
4. 將打包傳輸?shù)紹機(jī)
$ scp product.tar oracle@IP:/u01/app/oracle
B機(jī)操作:
1. 解壓tar包
$ cd /u01/app/oracle
$ tar -xvf product.tar
2. 檢測(cè)$ORACLE_HOME/network/admin目錄下listener.ora和tnsname.ora文件,修改HOST字段指向本機(jī)。
3. 運(yùn)行runinstall
$ cd $ORACLE_HOME/oui/bin
$ ./runInstall -silent -clone ORACLE_BASE=’/u01/app/oracle’ ORACLE_HOME=’/u01/app/oracle/product/11.2.0/db_1/’ ORACLE_HOME_NAME=’ORACLE_HOME_1’ (自定義名)
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3999 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-12-05_08-32-20AM. Please wait ...[oracle@localhost bin]$ Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2018-12-05_08-32-20AM.log
.................................................................................................... 100% Done.
Installation in progress (Wednesday, December 5, 2018 8:32:30 AM EST)
.............................................................................. 78% Done.
Install successful
Linking in progress (Wednesday, December 5, 2018 8:32:36 AM EST)
Link successful
Setup in progress (Wednesday, December 5, 2018 8:33:04 AM EST)
Setup successful
End of install phases.(Wednesday, December 5, 2018 8:33:27 AM EST)
WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script '/u01/app/oraInventory/orainstRoot.sh' with root privileges.
If you do not register the inventory, you may not be able to update or patch the products you installed.
The following configuration scripts need to be executed as the "root" user.
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of ORACLE_HOME_1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2018-12-05_08-32-20AM.log' for more details.
此時(shí),已經(jīng)完成了Oracle數(shù)據(jù)庫(kù)軟件的安裝
4. 開(kāi)啟監(jiān)聽(tīng)
$ lsnrctl start
5. 檢驗(yàn)sqlplus功能
$ sqlplus / as sysdba
感謝各位的閱讀!關(guān)于“如何通過(guò)克隆方式安裝Oracle數(shù)據(jù)庫(kù)軟件”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!
網(wǎng)頁(yè)題目:如何通過(guò)克隆方式安裝Oracle數(shù)據(jù)庫(kù)軟件
瀏覽地址:http://aaarwkj.com/article40/psocho.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、移動(dòng)網(wǎng)站建設(shè)、靜態(tài)網(wǎng)站、動(dòng)態(tài)網(wǎng)站、網(wǎng)頁(yè)設(shè)計(jì)公司、網(wǎng)站營(yíng)銷
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)