Oracle 11gR2 在VMWare虛擬機器中安裝步驟

來源:互聯網
上載者:User

一.在Oracle官網可以免費下載oracle的軟體和安裝文檔,如果是在虛擬機器中的linux系統裡安裝,可以用FileZilla Client把軟體發送到系統中。

推薦閱讀:

Rad Hat Enterprise Linux 5.5上安裝Oracle 11g R2 

linux_11gR2_database_1of2.zip
linux_11gR2_database_2of2.zip

二.硬體要求

1.oracle11g記憶體至少是1G,磁碟不要選擇虛擬機器中預設的20G,要更大些(30,40即可)。

虛擬記憶體容量,檢查的命令

記憶體
# grep MemTotal /proc/meminfo

交換空間
# grep SwapTotal /proc/meminfo

磁碟空間
# df -ah

三.軟體要求

1.核心檢查:cat  /proc/version(一般CentOS都是符合文檔要求的)

2.檢查和安裝所需的軟體包

通過查看Oracle安裝文檔中列出的Package Requirements可以查看在不同平台上需要的軟體包,下面列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0的要求,檢查下系統是否安裝過這些包,如果沒在對應的系統光碟片尋找對應的rpm包並安裝。

檢查工作:依次執行:rpm -qa | grep 下面軟體包

binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
gcc-4.1.1-52
gcc-c++-4.1.1-52
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11

缺少的軟體包在CentOS-5.8-i386-bin-DVD-1of2.iso中可以找到,可以用FileZilla Client把軟體包發送到系統中,如

一般缺少的如下:

elfutils-libelf-devel-0.137-3.el5.i386.rpm
libaio-devel-0.3.106
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11

然後安裝軟體包,命令如下
rpm -ivh *.rpm

在安裝時會提示出現問題,因為還需要其它軟體包

再加上
unixODBC-libs-2.2.11-10.el5.i386.rpm
elfutils-libelf-devel-static-0.137-3.el5.i386.rpm

安裝即可。

3.建立使用者組和安裝目錄


root使用者:建立Oracle安裝組oinstall,資料庫管理員組dba,及oracle使用者,還有目錄


groupadd oinstall


groupadd dba


mkdir -p  /u01/oracle

useradd -g oinstall -G dba oracle -d  /u01/oracle (主組oinstall,其它組:dba,預設的根目錄是/u01/oracle)

但是在RHEL 5或CentOS5中安裝oracle11g時,會出現下面的錯誤,

useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
 
進入/u01/oracle目錄,沒有.bash_profile',.bashrc,bash_logout
 
原因:
 
系統添加使用者的標準步驟
1.編輯/etc/passwd與/etc/group
2.建立使用者主目錄
3.從/etc/skel拷貝檔案與目錄
4.讓新使用者獲得其主目錄與檔案的擁有許可權
5.給新使用者一個密碼
 

解決辦法:
依舊使用上面的指令碼建使用者,然後手動拷貝設定檔到/u01/oracle下。
 
cp /etc/skel/.bash_profile /u01/oracle
 
cp /etc/skel/.bashrc /u01/oracle
 
cp /etc/skel/.bash_logout /u01/oracle
 
這樣既可。

最後加密碼和修改/u01的使用者和使用者組

passwd oracle
chown -R oracle:oinstall  /u01

4.修改核心參數

root使用者:修改 /etc/sysctl.conf 檔案,加上如下參數

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

為使上述配置生效而不重啟系統,執行如下命令
# /sbin/sysctl -p

5.修改使用者限制

root使用者:修改 /etc/security/limits.conf 檔案,加上下面的參數
oracle          soft    nproc  2047
oracle          hard    nproc  16384
oracle          soft    nofile  1024
oracle          hard    nofile  65536

 


6.修改使用者驗證選項


root使用者下:修改/etc/pam.d/login檔案加上如下參數


session    required    pam_limits.so
session    required      /lib/security/pam_limits.so

 

7.修改使用者設定檔

root使用者下:修改/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

8.修改使用者bash shell

su - oracle切換到oracle使用者下

$ vi .bash_profile

增加如下內容,主要是修改

unset  USERNAME
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=wilson
PATH=$ORACLE_HOME/bin:$PATH

export  ORACLE_BASE ORACLE_HOME  ORACLE_SID  PATH

其中ORACLE_SID是你要設定的oracle sid,隨便你取

完成後退出orcle使用者,然後再進入,

#su –oracle

#env | grep ORA查看環境變數是否完成

繼續閱讀請關注第2頁的精彩內容

  • 1
  • 2
  • 3
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.