標籤:oracle rac
[[email protected] ~]# groupadd -g 1300 dba[[email protected] ~]# groupadd -g 1301 oper[[email protected] ~]# groupadd -g 1000 oinstall [[email protected] ~]# groupadd -g 1200 asmadmin[[email protected] ~]# groupadd -g 1201 asmdba [[email protected] ~]# groupadd -g 1202 asmoper [[email protected] ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba grid[[email protected] ~]# echo grid | passwd --stdin grid[[email protected] ~]# id griduid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1300(dba),1200(asmadmin),1201(asmdba),1202(asmoper)[[email protected] ~]# su - grid[[email protected] ~]$ vi .bash_profileexport ORACLE_SID=+ASM1export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0.4/gridexport PATH=$ORACLE_HOME/bin:$PATHexport DISPLAY=192.168.1.99:0
[[email protected] ~]# groupadd -g 1300 dba[[email protected] ~]# groupadd -g 1301 oper[[email protected] ~]# groupadd -g 1000 oinstall [[email protected] ~]# groupadd -g 1200 asmadmin[[email protected] ~]# groupadd -g 1201 asmdba [[email protected] ~]# groupadd -g 1202 asmoper [[email protected] ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba grid[[email protected] ~]# echo grid | passwd --stdin grid[[email protected] ~]# id griduid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1300(dba),1200(asmadmin),1201(asmdba),1202(asmoper)[[email protected] ~]# su - grid[[email protected] ~]$ vi .bash_profilexport ORACLE_SID=+ASM2export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/11.2.0.4/gridexport PATH=$ORACLE_HOME/bin:$PATHexport DISPLAY=192.168.1.99:0
[[email protected] ~]# mkdir -p /u01/app/grid[[email protected] ~]# mkdir -p /u01/app/11.2.0.4/grid[[email protected] ~]# chown -R grid:oinstall /u01[[email protected] ~]# chmod -R 775 /u01
[[email protected] ~]# mkdir -p /u01/app/grid[[email protected] ~]# mkdir -p /u01/app/11.2.0.4/grid[[email protected] ~]# chown -R grid:oinstall /u01[[email protected] ~]# chmod -R 775 /u01
[[email protected] ~]# yum -y install binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel[[email protected] ~]# yum install -y compat-libstdc++*
[[email protected] ~]# yum -y install binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel[[email protected] ~]# yum install -y compat-libstdc++*
[[email protected] ~]# CVUQDISK_GRP=oinstall;[[email protected] ~]# export CVUQDISK_GRP[[email protected] ~]# rpm -ivh cvuqdisk-1.0.9-1.rpm[[email protected] ~]# CVUQDISK_GRP=oinstall;[[email protected] ~]# export CVUQDISK_GRP[[email protected] ~]# rpm -ivh cvuqdisk-1.0.9-1.rpm
[[email protected] ~]# service ntpd stop[[email protected] ~]# chkconfig ntpd off[[email protected] ~]# mv /etc/ntp.conf /etc/ntp.conf.back[[email protected] ~]# service ntpd stop[[email protected] ~]# chkconfig ntpd off[[email protected] ~]# mv /etc/ntp.conf /etc/ntp.conf.back
[[email protected] ~]# cat >> /etc/hosts <<EOF# Public Network - (eth0) 192.168.1.201 king01 192.168.1.202 king02 # Public Virtual IP (VIP) addresses - (eth0:1) 192.168.1.211 king01-vip 192.168.1.222 king02-vip EOF[[email protected] ~]# cat >> /etc/hosts <<EOF# Public Network - (eth0) 192.168.1.201 king01 192.168.1.202 king02 # Public Virtual IP (VIP) addresses - (eth0:1) 192.168.1.211 king01-vip 192.168.1.222 king02-vip EOF
[[email protected] ~]# cat >> /etc/profile <<EOF 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 fiEOF[[email protected] ~]# cat >> /etc/profile <<EOF 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 fiEOF
[[email protected] ~]# cat >> /etc/security/limits.conf <<EOFgrid soft nproc 2047 grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536EOF[[email protected] ~]# cat >> /etc/security/limits.conf <<EOFgrid soft nproc 2047 grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536EOF
[[email protected] ~]# cat >> /etc/sysctl.conf <<EOFkernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576fs.aio-max-nr=1048576net.ipv4.conf.default.rp_filter = 0EOF[[email protected] ~]# sysctl -p [[email protected] ~]# cat >> /etc/sysctl.conf <<EOFkernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576fs.aio-max-nr=1048576net.ipv4.conf.default.rp_filter = 0EOF[[email protected] ~]# sysctl -p
ORACLE RAC部署實錄(二):Oracle Grid Infrastructure