两台HP DL380(4CPU 8G 内存)
[root@rac1 ~]# more /proc/meminfo
MemTotal: 10254036 kB
[root@rac1 ~]# more /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
。。。。。。
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
一台IBM DS8100存储;
[@more@]本次安装使用11.2.0.3patch,这个patch是一个full install的patch,总共7个文件,只需要下载1,2,3就可以了。
DB的安装软件:
P10404530_112030_Linux-x86-64_1of7.zip
P10404530_112030_Linux-x86-64_2of7.zip
Grid的安装软件:
P10404530_112030_Linux-x86-64_3of7.zip
这个补丁可能需要metalink的账号才可以下载。在oracle的otn上只提供11.2.0.1的介质。
下载完成后,将安装介质拷贝到节点1,GIRD和db的安装将在节点1上进行。
#mkdir /setup
ftp 安装文件到/setup
#cd /setup
#unzip P10404530_112030_Linux-x86-64_1of7.zip
#unzip P10404530_112030_Linux-x86-64_2of7.zip
#unzip P10404530_112030_Linux-x86-64_3of7.zip
#ls –lt
drwxr-xr-x 8 root root 4096 Sep 22 2011 database
drwxr-xr-x 8 root root 4096 Sep 22 2011 grid
本例中grid 30g,oracle 100g,archivlog 200g,本例在rac1上完成,rac2上也要做同样的工作,这里不在重复描述.
[root@rac1 setup]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root
50G 5.7G 42G 13% /
tmpfs 4.9G 100K 4.9G 1% /dev/shm
/dev/cciss/c0d0p1 485M 39M 422M 9% /boot
/dev/mapper/vg_rac1-lv_home
9.9G 151M 9.2G 2% /home
[root@rac1 setup]# vgs
VG #PV #LV #SN Attr VSize VFree
vg_rac1 1 3 0 wz--n- 409.61g 337.82g
[root@rac1 setup]# lvcreate -L100g -n lv_oracle /dev/vg_rac1
[root@rac1 setup]# lvcreate -L200g -n lv_archivelog /dev/vg_rac1
[root@rac1 setup]# lvcreate -L30G -n lv_grid /dev/vg_rac1
[root@rac1 setup]# mke2fs /dev/vg_rac1/lv_oracle
[root@rac1 setup]# mke2fs /dev/vg_rac1/lv_archivelog
[root@rac1 setup]# mke2fs /dev/vg_rac1/lv_grid
[root@rac1 setup]# mkdir /oracle
[root@rac1 setup]# mkdir –p /archivelog/rac1
[root@rac1 setup]# mkdir /grid
[root@rac1 setup]# mkdir /grid_base
[root@dnlgl1 disks]# mkdir /oraInventory
[root@dnlgl1 disks]# chown -R grid:oinstall /oraInventory
[root@dnlgl1 disks]# chmod -R 755 /oraInventory
[root@rac1 setup]# mount /dev/vg_rac1/lv_oracle /oracle
[root@rac1 setup]# mount /dev/vg_rac1/lv_archivelog /archivelog/rac1
[root@rac1 setup]# mount /dev/vg_rac1/lv_grid /grid
编辑/etc/rc.local文件,增加下面三行内容
mount /dev/vg_rac1/lv_oracle /oracle
mount /dev/vg_rac1/lv_archivelog /archivelog/rac1
mount /dev/vg_rac1/lv_grid /grid
[root@rac1 setup]# df –h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9.7G 4.2G 5.1G 45% /
/dev/cciss/c0d0p1 99M 13M 81M 14% /boot
tmpfs 32G 0 32G 0% /dev/shm
/dev/mapper/VolGroup00-lv_oracle
40G 48M 38G 1% /oracle
/dev/mapper/VolGroup00-lv_grid
40G 48M 38G 1% /grid
/dev/mapper/VolGroup00-archivelog
99G 60M 94G 1% /archivelog/dnlgl1
#more /etc/rc.local
……
mount /dev/VolGroup00/lv_oracle /oracle
mount /dev/VolGroup00/lv_grid /grid
mount /dev/VolGroup00/archivelog /archivelog/dnlgl2
groupadd -g 1000 oinstall
groupadd -g 1020 asmadmin
groupadd -g 1021 asmdba
groupadd -g 1022 asmoper
groupadd -g 1031 dba
groupadd -g 1032 oper
useradd -u 1100 -g oinstall -G asmadmin,asmdba grid
useradd -u 1101 -g oinstall -G dba,asmdba,oper oracle
chown -R oracle:oinstall /oracle
chown -R oracle:dba /archivelog
chown -R grid:oinstall /grid
chown -R grid:oinstall /grid_base
chmod -R 755 /oracle
chmod -R 755 /grid
chmod -R 755 /archivelog
chmod -R 755 /grid_base
id oracle
id grid
passwd oracle
passwd grid
[root@dnlgl1 ~]# id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1021(asmdba),1031(dba),1032(oper)
[root@dnlgl1 ~]# id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1020(asmadmin),1021(asmdba)
说明:
Gird用户是GIRD 和asm的管理用户
Oracle是ORACLE_DB home的管理用户,数据库实例的管理用户。
查看用户和组的定义信息,可以访问下面两个文件。
more /etc/group
more /etc/passwd
[root@rac1 setup]# cd grid
[root@rac1 grid]# ls
doc install readme.html response rpm runcluvfy.sh runInstaller sshsetup stage welcome.html
[root@rac1 grid]# cd rpm
[root@rac1 rpm]# ls
cvuqdisk-1.0.9-1.rpm
[root@rac1 rpm]# rpm -iv cvuqdisk-1.0.9-1.rpm
Preparing packages for installation...
Using default group oinstall to install package
cvuqdisk-1.0.9-1
[root@rac1 rpm]# rpm -aq|grep cvuq
cvuqdisk-1.0.9-1.x86_64
因为rac2上没有安装介质,所以需要手工从rac1上复制安装文件到rac2上。
#scp /setup/grid/rpm/ cvuqdisk-1.0.9-1.x86_64 rac2:/tmp
复制过去后在rac2上,也安装一下cvuqdisk.
Cvuqdisk包在grid安装过程中时要求安装的,否则将报错。
[root@rac1 rpm]# rpm -aq|grep cvuq
cvuqdisk-1.0.9-1.x86_64
[root@rac2 tmp]# rpm -qa|grep cvuq
cvuqdisk-1.0.9-1.x86_64
Su – grid
More .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/grid
export ORACLE_HOME=$ORACLE_BASE/product/grid
export ORACLE_SID=+ASM1
export NLS_DATE_FORMAT="YYYY-MM-DD hh24:mi:ss"
export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH=$PATH:$ORACLE_BASE/common/oracle/bin:$ORACLE_BASE/common/oracle/sql:$ORACLE_HOME/rdbms/admin
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
su – oracle
more .bash_profile
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db
export ORACLE_SID=orcl1
export NLS_DATE_FORMAT="YYYY-MM-DD hh24:mi:ss"
export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH=$PATH:$ORACLE_BASE/common/oracle/bin:$ORACLE_BASE/common/oracle/sql:$ORACLE_HOME/rdbms/admin
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
More /etc/security/limits.conf
……
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
修改/etc/sysctl.conf 增加下面的内容:
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 4294967295
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
使上面的设置生效,执行命令
sysctl –p
使得下次重新启动后也生效,执行命令
chkconfig boot.sysctl on
检查内核的值,执行命令
sysctl –a
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/32980/viewspace-1059549/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/32980/viewspace-1059549/