oracle 靜默安裝

來源:互聯網
上載者:User

標籤:oracle

下載oracle的安裝包:

注意下載oracle是需要註冊oracle的

http://download.oracle.com/otn/nt/oracle11g


下載兩個包:

linux.x64_11gR2_database_1of2.zip  

linux.x64_11gR2_database_2of2.zip

1、上傳:到伺服器:

mkdir -p /usr/local/oracle

cd /usr/local/oracle

將兩個包放在環境中:

unzip linux.x64_11gR2_database_1of2.zip  

unzip linux.x64_11gR2_database_2of2.zip

2、準備oracle的安裝目標目錄

mkdir –p /opt/oracle

3、建立oracle相關使用者和使用者組

groupadd dba

groupadd oinstall

useradd -g oinstall -G dba oracle

passwd oracle

輸入密碼:

修改安裝目錄許可權:

chown –R oracle:oinstall /opt/oracle

4,掛載安裝載:

上傳安裝盤到伺服器:

安裝盤名稱:RHEL_5.6x86_64.iso

掛載目錄:/home/os

mkdir -p /home/os

mount -o loop -t iso9660 RHEL_5.6x86_64.iso os

cd os/Server

5,安裝所需要基本編譯工具:

[[email protected] oracle]#rpm -ivh kernel-headers-
[[email protected] oracle]#rpm -ivh glibc-headers-
[[email protected] oracle]#rpm -ivh glibc-devel-
[[email protected] oracle]#rpm -ivh libgomp-
[[email protected] oracle]#rpm -ivh sysstat-
[[email protected] oracle]#rpm -ivh libaio-devel-
[[email protected] oracle]#rpm -ivh libstdc++-devel-
[[email protected] oracle]#rpm -ivh unixODBC-
[[email protected] oracle]#rpm -ivh unixODBC-devel
[[email protected] oracle]#rpm -ivh gcc-
[[email protected] oracle]#rpm -ivh gcc-c++-
[[email protected] oracle]#rpm -ivh elfutils-libelf-devel- elfutils-libelf-devel-static-

6,設定修改核參數:

開啟 /etc/sysctl.conf,在最後加入以下內容

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

使其生效:

 sysctl -p

7,修改 /etc/security/limits.conf,oracle 使用者登陸的限制參數:在最後加入以下內容

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


8,修改系統內容變數/etc/profile

修改環境變數/etc/profile,加入以下內容
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi


9:設定ORACLE環境變數

export ORACLE_SID=orcl
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

10:修改使用者登陸環境變數   .bashrc 

export ORACLE_SID=orcl
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib


11:執行安裝

安裝第一步:

su - oracle

cd /usr/local/oracle/database

請下載db.rsp  到家目錄  /home/oracle下,然後執行

 ./runInstaller -silent -noconfig -ignorePrereq -responseFile     /home/oracle/db.rsp

執行 

查看安裝過程

可以到/home/oracle/oraInventory/logs 目錄下查看安裝進度。

tail -100f installActions2014-09-03_10-36-42AM.log 

3)安裝成功提示執行指令碼

到最後提示:

/opt/app/oracle/oraInventory/orainstRoot.sh

/opt/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 

4. Return to this window and hit "Enter" key to continue 

Successfully Setup Software.






oracle 靜默安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.