11g oracle database installation withoracle grid infrastructure on linux
一、預裝oracle database 準備
補丁檢測
for i in binutils compat-gcc-34compat-libstdc++-296 control-center \
gcc gcc-c++ glibc glibc-common glibc-devel libaio libgcc \
libstdc++ libstdc++-devel libXp make openmotif22 setarch
do
rpm -q $i &>/dev/null || F="$F$i"
done ;echo $F;unset F
安裝11g oracle database所需的linux軟件包
安裝命令執行
yum install binutils compat-libstdc++elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibcglibc-common glibc-develglibc-headers ksh-20060214 libaio libaio-devel libgcc libstdc++-libstdc++-devel make-3.81 sysstat unixODBC unixODBC-devel
建立oracle產品組,root用戶
vi /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
DNS解析,直接配置hosts文件
vi /etc/hosts
10.124.88.38 Imagetest2
查看當前swap
grep SwapTotal /proc/meminfo
注:在線增加swap,請看附表增加swap
查看當前shmfs
df -h /dev/shm
注:oracle 11g AMM 使用內存需要通過更多的共享內存
(如需增加/dev/shm請看附表增加/dev/shm)
建立組
/usr/sbin/groupadd -g 509 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
建立用戶
/usr/sbin/useradd -u 510 -g oinstall -Gdba,oper,asmdba oracle
修改密碼
passwd oracle
注:具體組和用戶含義請看附表Overview of Groups and Users
用戶環境變量
--oracle---
vi .bash_profile
export ORACLE_SID=doudou
export ORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export TMP=/tmp
export TMPDIR=/u01/tmp
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:
umask 022
注:tmp空間不足時,添加TMPDIR;可以看附表增大tmp
建立目錄
--oracle database--
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app/oracle
chown oracle:oinstall /u01/app/oraInventory
安裝用戶資源限制
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
對默認的shell啓動文件進行更改,以便oracle安裝所有者的 ulimit設置
vi /etc/profile
if [ /$USER = "oracle" ] || [/$USER = "grid" ]; then
if [ /$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
更改內核參數值 直接複製到最底端即可
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 17179869184
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 = 1048576
################
kernel.shmall = 524288
kernel.shmmax = 1073741824
################
執行sysctl -p 立即生效
注: shmall and shmmax解釋請看附表 shmall and shmmax
shmall:physicalmemory/PAGESIZE
shmmax:Recommended: Morethan half the physical memory
getconf PAGESIZE
解壓
二、圖形安裝過程
安裝oracle database
[root@doudou-32bit ~]# su - oracle
[oracle@doudou-32bit ~]$ exportDISPLAY=192.168.1.25:0.0 (遠程端主機ip)
[oracle@doudou-32bit database]$./runInstaller
[oracle@doudou-32bit database ] dbca