Oracle linux6.4 安装11G rac集群配置手册

此处安装时我用VMware workstations 14 安装,创建操作系统时,将原来的网卡改为net模式,再选择添加了一个net模式的网卡,以便于添加一个虚拟网卡 Eth1
选择经典的安装模式。

安装完操作系统还需要配置本地yum源
配置过程如下
先用VMware挂载连接上Oracle linux6.4的操作系统
然后在root用户下配置

一。手工搞定安装本地yum源
********RHEL 6**********

1、备份原有的repo文件
在root用户下
mkdir /mnt/cdr
mount /dev/cdrom /media/
cd /media/
cp -rvf * /mnt/cdr/

cd /etc/yum.repos.d/
mv redhat.repo redhat.repo.bak
mv rhel-source.repo rhel-source.repo.bak

2、编辑配置文件
iso.repo

[base]
name=Server
baseurl=file:///mnt/cdr 备注:这个路径是后面一个mount /dev/cdrom 后面的目录
enabled=1
gpgcheck=0

3、yum源测试。

清空原有yum信息

yum clean all
yum repolist 这步命令可不执行

更新yum

yum update

5、验证
yum makecache或yum list

[root@udbs02 Desktop]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.204 udbs01
192.168.0.205 udbs02
192.168.98.88 udbs01-priv
192.168.98.89 udbs02-priv
192.168.0.207 udbs01-vip
192.168.0.208 udbs02-vip
192.168.0.210 udbs-scan

[root@udbs01 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=udbs01
NOZEROCONF=yes
[root@udbs02 Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=udbs02
NOZEROCONF=yes

[root@udbs01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:0E:D2:A6
TYPE=Ethernet
UUID=fea98116-53ac-4cfb-b38f-4034ad788e61
IPADDR=192.168.0.204
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
ONBOOT=yes
USERCTL=no
NM_CONTROLLED=yes
BOOTPROTO=none

[root@udbs01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:0C:29:0E:D2:B0
TYPE=Ethernet
UUID=6bb61d24-e2b0-4930-b1b7-eb91133fc086
IPADDR=192.168.98.88
NETMASK=255.255.248.0
GATEWAY=192.168.0.254
ONBOOT=yes
USERCTL=no

NM_CONTROLLED=yes

BOOTPROTO=none

[root@udbs02 Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:30:6F:3D
TYPE=Ethernet
UUID=c9d86910-989b-408d-9038-00f4a8e46c51
IPADDR=192.168.0.205
NETMAST=255.255.255.0
GATEWAY=192.168.0.254
ONBOOT=yes
USERCTL=no
NM_CONTROLLED=yes
BOOTPROTO=none

[root@udbs02 Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:0C:29:30:6F:47
TYPE=Ethernet
UUID=107010cf-ffea-4473-b999-b309b32fa392
IPADDR=192.168.98.89
NETMASK=255.255.248.0
GATEWAY=192.168.0.254
ONBOOT=yes
USERCTL=no
NM_CONTROLLED=yes
BOOTPROTO=none

groupadd -g 500 oinstall
groupadd -g 501 dba
groupadd -g 502 oper
groupadd -g 503 asmadmin
groupadd -g 504 asmdba
groupadd -g 505 asmoper
useradd -m -u 500 -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -m -u 501 -g oinstall -G dba,oper,asmdba oracle

mkdir -p /u01/app
chown -R grid:oinstall /u01/app/
chmod -R 775 /u01/app/
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory/
chmod -R 775 /u01/app/oraInventory/
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01/app/grid/
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/grid/
chmod -R 775 /u01/app/oracle/

[root@udbs01 ~]# su - grid
[grid@udbs01 ~] c a t . b a s h . b a s h h i s t o r y . b a s h l o g o u t . b a s h p r o f i l e . b a s h r c [ g r i d @ u d b s 01   ] cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME= O R A C L E B A S E / p r o d u c t / 11.2.0 e x p o r t P A T H = ORACLE_HOME/bin: P A T H : / u s r / l o c a l / b i n / e x p o r t L D L I B R A R Y P A T H = ORACLE_HOME/lib: O R A C L E H O M E / r d b m s / l i b : / l i b : / u s r / l i b e x p o r t P A T H = ORACLE_HOME/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin: O R A C L E H O M E / O P a t c h : / b i n : / u s r / c c s / b i n : PATH
export CLASSPATH= O R A C L E H O M E / J R E : ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
export CVUQDISK_GRP=oinstall
umask 022

PATH= P A T H : HOME/bin

export PATH

[grid@udbs02 ~]$ cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

export ORACLE_SID=+ASM2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME= O R A C L E B A S E / p r o d u c t / 11.2.0 e x p o r t P A T H = ORACLE_HOME/bin: P A T H : / u s r / l o c a l / b i n / e x p o r t L D L I B R A R Y P A T H = ORACLE_HOME/lib: O R A C L E H O M E / r d b m s / l i b : / l i b : / u s r / l i b e x p o r t P A T H = ORACLE_HOME/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin: O R A C L E H O M E / O P a t c h : / b i n : / u s r / c c s / b i n : PATH
export CLASSPATH= O R A C L E H O M E / J R E : ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
export CVUQDISK_GRP=oinstall
umask 022

PATH= P A T H : HOME/bin

export PATH

[root@udbs01 ~]# su - oracle

[oracle@udbs01 ~]$ cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

export ORACLE_SID=orcl1
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME= O R A C L E B A S E / p r o d u c t s / 11.2.0 e x p o r t P A T H = ORACLE_HOME/bin: P A T H : ORA_CRS_HOME/bin
export LD_LIBRARY_PATH= O R A C L E H O M E / l i b : ORACLE_HOME/rdbms/lib:/lib:/usr/lib
export PATH= O R A C L E H O M E / b i n : / u s r / b i n : / e t c : / u s r / s b i n : / u s r / u c b : / s b i n : ORACLE_HOME/OPatch:/bin:/usr/ccs/bin: P A T H e x p o r t C L A S S P A T H = ORACLE_HOME/JRE: O R A C L E H O M E / j l i b : ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask 022

PATH= P A T H : HOME/bin

export PATH

[root@udbs02 Desktop]# su - oracle
[oracle@udbs02 ~]$ cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

export ORACLE_SID=orcl2
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME= O R A C L E B A S E / p r o d u c t / 11.2.0 e x p o r t P A T H = ORACLE_HOME/bin: P A T H : ORA_CRS_HOME/bin
export LD_LIBRARY_PATH= O R A C L E H O M E / l i b : ORACLE_HOME/rdbms/lib:/lib:/usr/lib
export PATH= O R A C L E H O M E / b i n : / u s r / b i n : / e t c : / u s r / s b i n : / u s r / u c b : / s b i n : ORACLE_HOME/OPatch:/bin:/usr/ccs/bin: P A T H e x p o r t C L A S S P A T H = ORACLE_HOME/JRE: O R A C L E H O M E / j l i b : ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask 022

PATH= P A T H : HOME/bin

export PATH

vi /etc/selinux/config

service iptables save
service iptables stop
chkconfig iptables off

ssh

[root@udbs01 Desktop]# su - grid
[grid@udbs01 ~] s s h k e y g e n t r s a [ g r i d @ u d b s 01   ] ssh-keygen -t dsa
[root@udbs01 Desktop]# su - grid
[grid@udbs02 ~] s s h k e y g e n t r s a [ g r i d @ u d b s 02   ] ssh-keygen -t dsa

[grid@udbs01 ~] c a t   / . s s h / i d r s a . p u b >>   / . s s h / a u t h o r i z e d k e y s [ g r i d @ u d b s 01   ] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[grid@udbs01 ~] s s h u d b s 02 c a t   / . s s h / i d r s a . p u b >>   / . s s h / a u t h o r i z e d k e y s T h e a u t h e n t i c i t y o f h o s t u d b s 02 ( 192.168.0.205 ) c a n t b e e s t a b l i s h e d . R S A k e y f i n g e r p r i n t i s 95 : f d : 3 b : 16 : 08 : f 0 : 79 : 2 b : f 8 : e 5 : e 5 : 27 : b f : 2 a : 99 : b c . A r e y o u s u r e y o u w a n t t o c o n t i n u e c o n n e c t i n g ( y e s / n o ) ? y e s W a r n i n g : P e r m a n e n t l y a d d e d u d b s 02 , 192.168.0.205 ( R S A ) t o t h e l i s t o f k n o w n h o s t s . g r i d @ u d b s 02 s p a s s w o r d : [ g r i d @ u d b s 01   ] ssh udbs02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
grid@udbs02’s password:
[grid@udbs01 ~]$ scp ~/.ssh/authorized_keys udbs02:~/.ssh/authorized_keys
grid@udbs02’s password:
authorized_keys

[root@udbs01 Desktop]# su - oracle
[oracle@udbs01 ~] s s h k e y g e n t r s a [ o r a c l e @ u d b s 01   ] ssh-keygen -t dsa

[root@udbs02 Desktop]# su - oracle
[oracle@udbs02 ~] s s h k e y g e n t r s a [ o r a c l e @ u d b s 02   ] ssh-keygen -t dsa

[oracle@udbs01 ~] c a t   / . s s h / i d r s a . p u b >>   / . s s h / a u t h o r i z e d k e y s [ o r a c l e @ u d b s 01   ] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@udbs01 ~] s s h u d b s 02 c a t   / . s s h / i d r s a . p u b >>   / . s s h / a u t h o r i z e d k e y s T h e a u t h e n t i c i t y o f h o s t u d b s 02 ( 192.168.0.205 ) c a n t b e e s t a b l i s h e d . R S A k e y f i n g e r p r i n t i s 95 : f d : 3 b : 16 : 08 : f 0 : 79 : 2 b : f 8 : e 5 : e 5 : 27 : b f : 2 a : 99 : b c . A r e y o u s u r e y o u w a n t t o c o n t i n u e c o n n e c t i n g ( y e s / n o ) ? y e s W a r n i n g : P e r m a n e n t l y a d d e d u d b s 02 , 192.168.0.205 ( R S A ) t o t h e l i s t o f k n o w n h o s t s . o r a c l e @ u d b s 02 s p a s s w o r d : [ o r a c l e @ u d b s 01   ] ssh udbs02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@udbs02’s password:
[oracle@udbs01 ~]$ scp ~/.ssh/authorized_keys udbs02:~/.ssh/authorized_keys
oracle@udbs02’s password:
authorized_keys 100% 1996 2.0KB/s 00:00

service ntpd status
[grid@udbs01 ~]$ exit
logout
[root@udbs01 Desktop]# service ntpd status
ntpd is stopped
[root@udbs01 Desktop]# chkconfig ntpd off
[root@udbs01 Desktop]# mv /etc/ntp.conf /etc/ntp.conf.original
[root@udbs01 Desktop]# chkconfig nrtpd –list
error reading information on service nrtpd: No such file or directory
[root@udbs01 Desktop]# chkconfig ntpd –list
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@udbs01 Desktop]#

[oracle@udbs02 ~]$ cat /etc/security/limits.conf

/etc/security/limits.conf

#

Each line describes a limit for a user in the form:

#

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft core unlimited
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft core unlimited
oracle soft stack 10240

[oracle@udbs02 ~]$ cat /etc/pam.d/login

%PAM-1.0

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth

pam_selinux.so close should be the first session rule

session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_console.so
session required pam_limits.so

[oracle@udbs02 ~]$ cat /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

rpm -q binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ ksh glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC-devel unixODBC

oracle12C 安装部分区别

[root@udbs01 Desktop]#yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel

[root@udbs01 Desktop]# yum -y install glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel

cvuqdisk

rpm -ivh cvuqdisk-1.0.9-1.rpm

fdisk -l /dev/sdb

grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768

Oracle user

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768

oracle soft memlock 3145728
oracle soft memlock 3145728

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768

Oracle user

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 3145728
oracle soft memlock 3145728

检查配置是否符合安装要求命令:
su - grid
cd /stages/grid
ls
./runcluvfy.sh stage -pre crsinst -n udbs01,udbs02 -verbose

报INS-32012错误
解决措施:
su -
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/oracle/

猜你喜欢

转载自blog.csdn.net/qq_38264153/article/details/81781619