圖文並茂- 12C RAC的安裝 (一) : 作業系統引數的配置,ASM共享磁碟配置
阿新 • • 發佈:2019-01-04
虛擬環境:vCenter
OS: redhat 7.4
RDBMS:12.1.0.2.0
關閉防火牆,不然在安裝GI的時候,會提示各個節點之間網路不通,雖然可以ping通
systemctl stop firewalld
chkconfig firewalld off
/etc/hosts 設定
#public 192.168.54.96 rac01 192.168.54.98 rac02 192.168.54.70 rac03 #vip 192.168.54.97 rac01-vip 192.168.54.99 rac02-vip 192.168.54.71 rac03-vip #priv 10.10.10.96 rac01-priv 10.10.10.98 rac02-priv 10.10.10.70 rac03-priv #scan 192.168.54.107 scan 192.168.54.100 scan 192.168.54.103 scan
新增使用者和組
groupadd --gid 54321 oinstall groupadd --gid 54322 dba groupadd --gid 54323 asmdba groupadd --gid 54324 asmoper groupadd --gid 54325 asmadmin groupadd --gid 54326 oper groupadd --gid 54327 backupdba groupadd --gid 54328 dgdba groupadd --gid 54329 kmdba useradd --uid 54321 --gid oinstall --groups dba,oper,asmdba,asmoper,backupdba,dgdba,kmdba oracle # passwd oracle useradd --uid 54322 --gid oinstall --groups dba,asmadmin,asmdba,asmoper grid # passwd grid
ntp設定,其實不設定也可以
[[email protected] etc]# mv ntp.conf ntp.conf_bak
安裝需要的軟體包
binutils compat-libcap1 compat-libstdc++-33 -- 比較奇怪,這個包redhat7.4光盤裡面沒有的,用redhat6.9安裝的 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat libXmu libXt libXv libXxf86dgak libXxf86misc libXxf86vm xorg-x11-utils xorg-x11-xauth nfs-utils
配置yum源(略,看本人blog中的文件),並安裝軟體包,把上面的包,編輯到txt檔案中,安裝。
vi /tmp/req-rpm.txt
yum install `awk '{print $1}' /tmp/req-rpm.txt`
OS配置
vi /etc/selinux/config
SELINUX=enforcing
vi /etc/sysctl.conf
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
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
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.panic_on_oops = 1
vi /etc/security/limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
grid soft nproc 16384
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
vi /etc/pam.d/login
session required pam_limits.so
vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
建立安裝所需的資料夾
mkdir --parents /u01/app/grid
chown --recursive grid.oinstall /u01/
mkdir /u01/app/oracle
chown --recursive oracle.oinstall /u01/app/oracle
-- 新增共享磁碟,具體可以參考之前的文章https://blog.csdn.net/xxzhaobb/article/details/83140556
配置Udev 繫結磁碟
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c29a54c510ebeff1f64a075dd2db
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c293e6f1c7c9263d15d7467f022d
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd
36000c29e0cf0a5620059aef7a996d894
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sde
36000c290b033bf7c73022e6f73dd60b5
[[email protected] ~]#
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c29a54c510ebeff1f64a075dd2db
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c293e6f1c7c9263d15d7467f022d
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd
36000c29e0cf0a5620059aef7a996d894
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sde
36000c290b033bf7c73022e6f73dd60b5
[[email protected] ~]#
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c29a54c510ebeff1f64a075dd2db
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c293e6f1c7c9263d15d7467f022d
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd
36000c29e0cf0a5620059aef7a996d894
[[email protected] ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sde
36000c290b033bf7c73022e6f73dd60b5
[[email protected] ~]#
vi /etc/udev/rules.d/99-oracle-asm.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29a54c510ebeff1f64a075dd2db", SYMLINK+="asm-ocr01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c293e6f1c7c9263d15d7467f022d", SYMLINK+="asm-date01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29e0cf0a5620059aef7a996d894", SYMLINK+="asm-ocr02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c290b033bf7c73022e6f73dd60b5", SYMLINK+="asm-ocr03", OWNER="grid", GROUP="asmadmin", MODE="0660"
檢視繫結的磁碟
[[email protected] ~]# ll /dev/asm*
lrwxrwxrwx 1 root root 4 Jan 3 03:34 /dev/asm-date01 -> sdc1
lrwxrwxrwx 1 root root 4 Jan 3 03:34 /dev/asm-ocr01 -> sdb1
lrwxrwxrwx 1 root root 4 Jan 3 03:34 /dev/asm-ocr02 -> sdd1
lrwxrwxrwx 1 root root 4 Jan 3 03:34 /dev/asm-ocr03 -> sde1
[[email protected] ~]#
[[email protected] ~]# ll /dev/asm*
|lrwxrwxrwx 1 root root 4 Jan 3 03:33 /dev/asm-date01 -> sdc1
lrwxrwxrwx 1 root root 4 Jan 3 03:33 /dev/asm-ocr01 -> sdb1
lrwxrwxrwx 1 root root 4 Jan 3 03:33 /dev/asm-ocr02 -> sdd1
lrwxrwxrwx 1 root root 4 Jan 3 03:33 /dev/asm-ocr03 -> sde1
[[email protected] ~]# |
[[email protected] ~]# ll /dev/asm*
lrwxrwxrwx. 1 root root 4 Jan 3 03:33 /dev/asm-date01 -> sdc1
lrwxrwxrwx. 1 root root 4 Jan 3 03:33 /dev/asm-ocr01 -> sdb1
lrwxrwxrwx. 1 root root 4 Jan 3 03:33 /dev/asm-ocr02 -> sdd1
lrwxrwxrwx. 1 root root 4 Jan 3 03:33 /dev/asm-ocr03 -> sde1
[[email protected] ~]#
基本的配置到這裡結束,接下來是grid的安裝。