在虛擬機上Red Hat Enterprise Linux 5.5系統下安裝Oracle 11g R2版本數據庫成功了,在這里把安裝的經驗和大家分享一下!之前查過
學習的進度有點慢,終于在虛擬機上Red Hat Enterprise Linux 5.5系統下安裝Oracle 11g R2版本數據庫成功了,在這里把安裝的經驗和大家分享一下!當然,水平有限,請各路大蝦們多包涵,多指教!!
我用的軟件版本是linux_11gR2_database_32bit,可以到oracle官網上下載。
之前查過oracle的官方安裝文檔,上面有介紹,對一些硬件環境和軟件包等的要求。這里暫時羅列我這次用到的相關信息。希望對大家有所幫助。
Oracle 11g R2數據庫安裝硬件配置要求:
最小內存 1 GB of RAM
虛擬內存容量
Available RAM Swap SpaceRequired
Between 1 GB and 2 GB 1.5times the size of RAM
Between 2 GB and 16 GB Equal to the size of RAM
More than 16 GB 16 GB
硬盤空間要求
Installation Type Requirement for Software Files (GB)
Enterprise Edition 3.95
Standard Edition 3.88
Oracle 11g R2數據庫支持的操作系統
Oracle Database 11g Release 2 (11.2) forLinux x86:
Asianux 2.0
Asianux 3.0
Oracle Enterprise Linux 4.0 Update 7 orlater
Oracle Enterprise Linux 5.0
Red Hat Enterprise Linux 4.0 Update 7 orlater
Red Hat Enterprise Linux 5.0
SUSE Linux Enterprise Server 10.0
SUSELinux Enterprise Server 11.0
需要的軟件包支持:
這里只列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux5.0等系統對軟件包的要求系統是否安裝過這些包。
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.2
unixODBC-2.2.11 (32-bit) or later
unixODBC-devel-2.2.11 (64-bit) or later
unixODBC-2.2.11 (64-bit) or later
下面開始正式的安裝過程:
1、安裝前準備工作、軟件包檢查、配置環境變量
將oralce的安裝包上傳到主機上,推薦一個工具SSH Secure Shell Client,很好用。如下我上傳到了root用戶的桌面上并解壓:
[root@oraclehost ~]# ls
linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
[root@oraclehost ~]# unzip linux_11gR2_database_1of2.zip
[root@oraclehost ~]# unzip linux_11gR2_database_2of2.zip
[root@oraclehost ~]# ls
database linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
1.1 檢查所需軟件包是否已安裝
根據上面所羅列的在rhel5下安裝oracle所需的軟件包,一一檢查是否已安裝,命令為:
rpm–qa | grep package_name
如果已安裝,命令輸出會打印出已安裝的軟件包的名稱;如果沒有輸出,則證明此包沒有安裝,可從RedHat的安裝盤或者鏡像中獲取,然后使用如下命令安裝:
rpm -ivh package_name
1.2 創建oracle用戶
根據oracle官方文檔所述,需要創建oinstall、dba、oper(可選)用戶組和oralce用戶,下面是我的創建過程,不過我并沒有創建oper組:
[root@oraclehost ~]#/usr/sbin/groupadd oinstall
[root@oraclehost ~]#/usr/sbin/groupadd dba
[root@oraclehost ~]#/usr/sbin/useradd -g oinstall -G dbaoracle
[root@oraclehost ~]#passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@oraclehost ~]#
1.3 修改系統相關參數
1.3.1 修改內核參數
修改 /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
配置完后,執行下面命令將參數寫入內核應用
[root@oraclehost ~]#/sbin/sysctl -p
1.3.2 修改用戶的限制和驗證等配置文件
修改 /etc/security/limits.conf文件,加上下面的參數
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
修改用戶驗證選項
修改/etc/pam.d/login文件加上如下參數
session required pam_limits.so
修改/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
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com