這篇文章給大家分享的是有關如何通過克隆方式安裝Oracle數(shù)據(jù)庫軟件的內(nèi)容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
成都創(chuàng)新互聯(lián)公司2013年成立,先為秀嶼等服務建站,秀嶼等地企業(yè),進行企業(yè)商務咨詢服務。為秀嶼企業(yè)網(wǎng)站制作PC+手機+微官網(wǎng)三網(wǎng)同步一站式服務解決您的所有建站問題。有時候,如果幾個機器的配置相似,就不需要一遍又一遍地安裝數(shù)據(jù)庫軟件了。這種情況下可以采用克隆安裝的方式,比圖形界面和靜默安裝更快捷。
源主機:A機
目標主機:B機
1. B機創(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ù)說明 -g 指定用戶組
-G 指定附加組
-d 指定用戶目錄
激活oracle用戶(修改oracle用戶密碼)
#passwd oracle
2. B機創(chuàng)建數(shù)據(jù)庫安裝目錄并分配權限
# 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ù)庫軟件(ORACLE_HOME)安裝在本地,將數(shù)據(jù)(oradata/backup/archivelog)安裝在存儲中
3. 檢查B機修改內(nèi)核參數(shù)與A機一致
# vi /etc/sysctl.conf
4. 檢查B機修改用戶限制文件與A機一致
# vi /etc/security/limits.conf
5. 檢查B機修改Oracle環(huán)境變量與A機一致(oracle用戶)
$ vi .bash_pfile
6. B機安裝相應需求包
#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機操作:
1. 關閉數(shù)據(jù)庫
$ sqlplus / as sysdba
SQL> shutdown immediate;
2. 關閉監(jiān)聽
$ lsnrctl stop
3. 打包/u01/app/oracle/product/目錄
$ cd /u01/app/oracle
$ tar -cvf /u01/app/oracle/product.tar product/
4. 將打包傳輸?shù)紹機
$ scp product.tar oracle@IP:/u01/app/oracle
B機操作:
1. 解壓tar包
$ cd /u01/app/oracle
$ tar -xvf product.tar
2. 檢測$ORACLE_HOME/network/admin目錄下listener.ora和tnsname.ora文件,修改HOST字段指向本機。
3. 運行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.
此時,已經(jīng)完成了Oracle數(shù)據(jù)庫軟件的安裝
4. 開啟監(jiān)聽
$ lsnrctl start
5. 檢驗sqlplus功能
$ sqlplus / as sysdba
感謝各位的閱讀!關于“如何通過克隆方式安裝Oracle數(shù)據(jù)庫軟件”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
標題名稱:如何通過克隆方式安裝Oracle數(shù)據(jù)庫軟件-創(chuàng)新互聯(lián)
URL鏈接:http://jinyejixie.com/article46/hgceg.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、定制網(wǎng)站、企業(yè)網(wǎng)站制作、網(wǎng)站內(nèi)鏈、移動網(wǎng)站建設、網(wǎng)頁設計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容