Linux克隆安裝Oracle數(shù)據(jù)庫(kù)軟件的方法是什么-創(chuàng)新互聯(lián)

本篇內(nèi)容介紹了“Linux克隆安裝Oracle數(shù)據(jù)庫(kù)軟件的方法是什么”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

洪山網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),洪山網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為洪山上千余家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)營(yíng)銷網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的洪山做網(wǎng)站的公司定做!一、規(guī)劃

A機(jī)

B機(jī)

Linux版本:

Linux 6.5 64-bit

Linux 6.5 64-bit

Oracle版本:

11.2.0.4

11.2.0.4

ORACLE_BASE:

/u01/app/oracle

/u01/app/oracle

ORACLE_HOME:

/u01/app/oracle/product/11.2.0/db_1

/u01/app/oracle/product/11.2.0/db_1

如果幾個(gè)機(jī)器的配置相似,就不需要一遍又一遍地安裝數(shù)據(jù)庫(kù)軟件了。這種情況下可以采用克隆安裝的方式,比圖形界面和靜默安裝更快捷。 

源主機(jī):A機(jī),已經(jīng)安裝完數(shù)據(jù)庫(kù)軟件、安裝完監(jiān)聽、建好庫(kù)

目標(biāo)主機(jī):B機(jī),安裝完操作系統(tǒng),配置最好與A機(jī)保持一致

二、思路清晰

step1: B機(jī)創(chuàng)建用戶、組

step2: B機(jī)創(chuàng)建目錄并賦予權(quán)限

step3: B機(jī)檢查內(nèi)核參數(shù)、用戶限制、環(huán)境變量、安裝包

step4: A機(jī)關(guān)庫(kù)、關(guān)監(jiān)聽

step5: A機(jī)壓縮目錄,并傳到B機(jī)相同目錄下

step6: B機(jī)解壓傳過(guò)來(lái)的壓縮包

step7: B機(jī)修改監(jiān)聽文件和tns文件

step8: B機(jī)運(yùn)行runinstall腳本

step9: B機(jī)完成檢查

三、準(zhǔn)備工作

1.  B機(jī)創(chuàng)建用戶和用戶組

# groupadd -g 501 oinstall

# groupadd -g 502 dba

# useradd -g oinstall -G dba -u 501 -d /home/oracle oracle

參數(shù)說(shuō)明 -g 指定用戶組

-G 指定附加組

-d 指定用戶目錄

激活oracle用戶(修改oracle用戶密碼)

# passwd oracle

2. 創(chuàng)建好目錄并配置權(quán)限

# mkdir -p /u01/app/oracle/product/11.2.0/db_1

# mkdir -p /u01/setup/os --用于操作系統(tǒng)iso文件存放

# mkdir -p /u01/setup/db --用于軟件包文件存放

# mkdir -p /oradata   --用于存放數(shù)據(jù)文件

# mkdir -p /backup   --用于存放備份文件

# mkdir -p /archivelog  --用于存放歸檔日志文件

# 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)聽

$ 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

oracle@172.16.70.171's password:

product.tar                             100% 4225MB  62.1MB/s   01:08  

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

$ ./runInstaller -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ù)軟件的安裝

1. 開啟監(jiān)聽

$ lsnrctl start

2. 檢驗(yàn)sqlplus功能

$ sqlplus / as sysdba

(注意此時(shí)已經(jīng)安裝完了數(shù)據(jù)庫(kù)軟件,并沒有建庫(kù))

“Linux克隆安裝Oracle數(shù)據(jù)庫(kù)軟件的方法是什么”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

網(wǎng)頁(yè)名稱:Linux克隆安裝Oracle數(shù)據(jù)庫(kù)軟件的方法是什么-創(chuàng)新互聯(lián)
新聞來(lái)源:http://bm7419.com/article48/dssgep.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站建設(shè)、App開發(fā)、網(wǎng)站維護(hù)、虛擬主機(jī)手機(jī)網(wǎng)站建設(shè)、網(wǎ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)

h5響應(yīng)式網(wǎng)站建設(shè)