1.安裝環(huán)境
操作系統(tǒng):Red hat 6.5
內(nèi)存:內(nèi)存最低要求256M (使用:grep MemTotal /proc/meminfo 命令查看)
交換空間:SWAP交換空間大小根據(jù)內(nèi)存大小決定(使用:grep SwapTotal /proc/meminfo 命令查看)
硬盤(pán)空間:不低于20G,/tmp文件空閑不低于400M,軟件安裝目錄空間最好不低于5G (使用:df -h命令查看)
2.安裝過(guò)程
1).添加用戶(hù)組和用戶(hù),并給用戶(hù)設(shè)置密碼
[root@redhat ~]# groupadd oinstall
[root@redhat ~]# groupadd dba
[root@redhat ~]# useradd -g oinstall -G dba oracle
[root@redhat ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
2).創(chuàng)建安裝目錄,分配用戶(hù)組與權(quán)限
[root@redhat ~]# mkdir -p /u01/app/oracle/product
[root@redhat ~]#mkdir /u01/app/oradata
[root@redhat ~]#chown -R oracle:oinstall /u01
[root@redhat ~]#chmod -R 755 /u01
3).上傳oracle 11g安裝包并解壓
[root@redhat u01]#unzip linux.x64_11gR2_database_1of2.zip
[root@redhat u01]#unzip linux.x64_11gR2_database_2of2.zip
4).在/etc目錄下創(chuàng)建一個(gè)名為oraInst.loc的文件并修改權(quán)限
[root@redhat etc]#vi oraInst.loc
在文件中插入以下內(nèi)容:
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
保存后,修改權(quán)限:
[root@redhat etc]# chown oracle:oinstall oraInst.loc
[root@redhat etc]# chmod 664 oraInst.loc
5).修改系統(tǒng)參數(shù)
[root@redhat etc]#vi /etc/sysctl.conf
加入以下代碼(將原來(lái)的kernel.shmmax和kernel.shmall這兩行參數(shù)注釋):
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
執(zhí)行sysctl -p 使設(shè)置生效
[root@redhat etc]#vi /etc/security/limits.conf
在結(jié)尾處添加以下內(nèi)容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@redhat etc]# vi /etc/pam.d/login
在結(jié)尾處添加以下內(nèi)容:
session required /lib/security/pam_limits.so
session required pam_limits.so
6).修改環(huán)境變量
[root@redhat etc]# vi /etc/profile
在結(jié)尾處添加以下內(nèi)容:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
使用source /etc/profile 使設(shè)置生效。
切換到oracle用戶(hù)
[oracle@redhat ~]# cd/home/oracle
[oracle@redhat ~]#vi .bash_profile
在文件下面插入如下內(nèi)容:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=bpas
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US.UTF-8
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
使用source .bash_profile 使修改生效
7).開(kāi)始安裝
我用的是圖形化傻瓜安裝方式,這樣操作起來(lái)簡(jiǎn)單直觀
root用戶(hù)下:
[root@redhat ~]# xhost +
切換到oracle用戶(hù):
[root@redhat ~]# su - oracle
[root@redhat ~]#export DISPLAY=你的ip:0.0(示例:export DISPLAY=192.168.1.1:0.0)
[root@redhat ~]#cd /u01/database
[root@redhat database]#./runInstaller
圖形化安裝第一步:取消推送,點(diǎn)next

第二步,跳過(guò)軟件更新,點(diǎn)next:

第三步,創(chuàng)建數(shù)據(jù)庫(kù):

第四步,選擇數(shù)據(jù)庫(kù)安裝類(lèi)型:

第五步,默認(rèn)選項(xiàng),下一步:

第六步,選擇安裝版本:

第七步,默認(rèn)選項(xiàng):

第八步,選擇用戶(hù)組,下一步:

第九步,檢查依賴(lài):
由于我的本地環(huán)境提前安裝好了rpm安裝包,下面是redhat6.5環(huán)境下需要安裝的軟件包(可以在你的鏡像文件下找到,不用去下載):

安裝完之后,點(diǎn)擊check again重新檢查下,看看還有沒(méi)有問(wèn)題:

第十步,點(diǎn)擊安裝:

等待安裝完成:

安裝過(guò)程中會(huì)提示以下內(nèi)容:

按照它的提示步驟完成操作:
[oracle@redhat ~]# su root
[oracle@redhat ~]# cd /u01/app/oracle/product/11.2.0
[oracle@redhat ~]# ./root.sh
然后點(diǎn)擊ok。

到此步已經(jīng)完成oracle 11g的安裝。
總結(jié)
以上所述是小編給大家介紹的Linux虛擬機(jī)下安裝Oracle 11G教程圖文解說(shuō),希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!
您可能感興趣的文章:- Linux靜默安裝Oracle11g部分問(wèn)題的解決方法
- Linux 7下腳本安裝配置oracle 11g r2教程
- linux系統(tǒng)下oracle11gR2靜默安裝的經(jīng)驗(yàn)分享
- Linux下安裝Oracle 11g出現(xiàn)prvf-0002錯(cuò)誤解決辦法
- Linux系統(tǒng)(X64)安裝Oracle11g完整安裝圖文教程另附基本操作
- DBA 在Linux下安裝Oracle Database11g數(shù)據(jù)庫(kù)圖文教程