在虛擬機(jī)上Red Hat Enterprise Linux 5.5系統(tǒng)下安裝Oracle 11g R2版本數(shù)據(jù)庫成功了,在這里把安裝的經(jīng)驗(yàn)和大家分享一下!之前查過
學(xué)習(xí)的進(jìn)度有點(diǎn)慢,終于在虛擬機(jī)上Red Hat Enterprise Linux 5.5系統(tǒng)下安裝Oracle 11g R2版本數(shù)據(jù)庫成功了,在這里把安裝的經(jīng)驗(yàn)和大家分享一下!當(dāng)然,水平有限,請各路大蝦們多包涵,多指教!!
我用的軟件版本是linux_11gR2_database_32bit,可以到oracle官網(wǎng)上下載。
之前查過oracle的官方安裝文檔,上面有介紹,對一些硬件環(huán)境和軟件包等的要求。這里暫時(shí)羅列我這次用到的相關(guān)信息。希望對大家有所幫助。
Oracle 11g R2數(shù)據(jù)庫安裝硬件配置要求:
最小內(nèi)存 1 GB of RAM
虛擬內(nèi)存容量
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數(shù)據(jù)庫支持的操作系統(tǒng)
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等系統(tǒng)對軟件包的要求系統(tǒng)是否安裝過這些包。
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、安裝前準(zhǔn)備工作、軟件包檢查、配置環(huán)境變量
將oralce的安裝包上傳到主機(jī)上,推薦一個(gè)工具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 檢查所需軟件包是否已安裝
根據(jù)上面所羅列的在rhel5下安裝oracle所需的軟件包,一一檢查是否已安裝,命令為:
rpm–qa | grep package_name
如果已安裝,命令輸出會打印出已安裝的軟件包的名稱;如果沒有輸出,則證明此包沒有安裝,可從RedHat的安裝盤或者鏡像中獲取,然后使用如下命令安裝:
rpm -ivh package_name
1.2 創(chuàng)建oracle用戶
根據(jù)oracle官方文檔所述,需要創(chuàng)建oinstall、dba、oper(可選)用戶組和oralce用戶,下面是我的創(chuàng)建過程,不過我并沒有創(chuàng)建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 修改系統(tǒng)相關(guān)參數(shù)
1.3.1 修改內(nèi)核參數(shù)
修改 /etc/sysctl.conf文件,加上如下參數(shù)
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
配置完后,執(zhí)行下面命令將參數(shù)寫入內(nèi)核應(yīng)用
[root@oraclehost ~]#/sbin/sysctl -p
1.3.2 修改用戶的限制和驗(yàn)證等配置文件
修改 /etc/security/limits.conf文件,加上下面的參數(shù)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
修改用戶驗(yàn)證選項(xiàng)
修改/etc/pam.d/login文件加上如下參數(shù)
session required pam_limits.so
修改/etc/profile文件加入如下參數(shù):
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com