您好,登錄后才能下訂單哦!
ASM磁盤空間規劃
OCR+VOTING 8G三個NORMAL冗余
MGMT 80G 外部冗余
1、硬件檢測
內存(最少8G)
swap空間(4-16G equal to RAM more than 16GB:16GB )
/tmp目錄大小 >2G
空閑內存
內核版本:
uname -r
2、系統版本
3、修改主機名:
節點1:
hostname dwdb1
hostnamectl --static set-hostname dwdb1
節點2:
hostname dwdb2
hostnamectl --static set-hostname dwdb2
4、關閉防火墻:
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
看狀態
firewall-cmd --state
systemctl stop firewalld.service
systemctl disable firewalld.service
5、配置主機名和IP地址對應關系
vi /etc/hosts 添加如下內容
10.1.11.1 dwdb1
10.1.11.2 dwdb2
20.1.1.39 dwdb1-priv
20.1.1.40 dwdb2-priv
10.1.11.161 dwdb1-vip
10.1.11.162 dwdb2-vip
10.1.11.163 scan-dwdb
修改/etc/sysconfig/network
NOZEROCONF=yes
6、安裝依賴包:(oracle linux 7.2依賴包如下,具體可參考官方文檔)
yum install -y binutils-2.23.52.0.1-12.el7
yum install -y compat-libcap1-1.10-3.el7
yum install -y compat-libstdc++-33-3.2.3-71.el7
yum install -y glibc-2.17-36.el7
yum install -y glibc-devel-2.17-36.el7
yum install -y ksh
yum install -y libaio-0.3.109-9.el7
yum install -y libaio-devel-0.3.109-9.el7
yum install -y libX11-1.6.0-2.1.el7
yum install -y libXau-1.0.8-2.1.el7
yum install -y libXi-1.7.2-1.el7
yum install -y libXtst-1.2.2-1.el7
yum install -y libgcc-4.8.2-3.el7
yum install -y libstdc++-4.8.2-3.el7
yum install -y libstdc++-devel-4.8.2-3.el7
yum install -y libxcb-1.9-5.el7
yum install -y make-3.82-19.el7
yum install -y nfs-utils-1.3.0-0.21.el7.x86_64
yum install -y net-tools-2.0-0.17.20131004git.el7
yum install -y smartmontools-6.2-4.el7
yum install -y sysstat-10.1.5-1.el7
yum install -y compat-libcap1-1.10
yum install -y sysstat-10.1.5
yum install -y libaio-devel-0.3.109
7、關閉transparent hugepages,設置hugepages
查看transparent hugepage
Red Hat Enterprise Linux kernels:
Other kernels:
oracle linux 7.2 沒有開啟transparent hugepages,忽略。
8、啟用Name Service Cache Deamon
7、verifying the Disk I/O Scheduler on Linux
cat /sys/block/${ASM_DISK}/queue/scheduler
noop [deadline] cfq
8、配置NTP時間同步
server 10.1.30.231 iburst
server 10.1.30.232 iburst
systemctl enable ntpd.service
systemctl restart chronyd.service
systemctl enable chronyd.service
9、網絡配置(/etc/sysctl.conf)
private address to 2
public address to 1
bond1 p4p1 em3 20.1.1.39 private
bond0 p5p1 p6p1 10.1.11.1 public
net.ipv4.conf.p4p1.rp_filter=2
net.ipv4.conf.em3.rp_filter=2
net.ipv4.conf.p5p1.rp_filter=1
net.ipv4.conf.p6p1.rp_filter=1
10、用戶和組:
/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54323 oper
/usr/sbin/groupadd -g 54324 backupdba
/usr/sbin/groupadd -g 54325 dgdba
/usr/sbin/groupadd -g 54326 kmdba
/usr/sbin/groupadd -g 54327 asmdba
/usr/sbin/groupadd -g 54328 asmoper
/usr/sbin/groupadd -g 54329 asmadmin
/usr/sbin/groupadd -g 54330 racdba
passwd oracle
hagj5Xc2GokR
passwd grid
a31K0eBBJMXW
11、目錄:
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 71 /u01/app/oraInventory
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
mkdir -p /u01/12.2.0/grid
chown -R grid:oinstall /u01/12.2.0/grid
chmod -R 71 /u01/12.2.0/grid
mkdir -p /u01/app/oracle
mkdir /u01/app/oracle/fetology
chown -R oracle:oinstall /u01/app/oracle
chmod -R 71 /u01/app/oracle
mkdir -p /u01/app/oracle/product/12.2.0/db_1
chown -R oracle:oinstall /u01/app/oracle/product/12.2.0/db_1
chmod -R 71 /u01/app/oracle/product/12.2.0/db_1
12、環境變量
節點1:
--oracle用戶
export ORACLE_SID=dwdb1
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
--grid
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/12.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
節點2:
--oracle用戶
export ORACLE_SID=dwdb2
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
--gird
export ORACLE_SID=+ASM2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/12.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
13、防火墻
/etc/init.d/iptables stop
chkconfig iptables off
networkmanager
chkconfig NetworkManager off
linux6上關閉防火墻和selinux,root下執行:
service iptables stop
chkconfig iptables off
service ip6tables stop
chkconfig ip6tables off
setenforce 0
getenforce
vi /etc/selinux/config 確保以下內容
SELINUX=disabled
linux6上 iptables關閉后 ip6tables會起來,所以最好一并關掉。
/etc/init.d/iptables stop
chkconfig iptables off
14、內核參數:
kernel.panic_on_oops = 1
fs.aio-max-nr = 104852
fs.file-max = 6815744
kernel.shmall = 134217728
kernel.shmmax = 558345748480
kernel.shmmni = 4096
kernel.sem = 5010 641280 5010 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_default = 8388608
net.core.wmem_max = 16777216
vm.swappiness = 0
vm.nr_hugepages = 163845
--修改以下兩個
kernel.shmall = 134217728
kernel.shmmax = 558345748480
--保存生效
/sbin/sysctl -p
15、限制文件:/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
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
16、/etc/pam.d/login文件
session required pam_limits.so
/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
17、配置互信
在兩個節點上執行:
su - oracle
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
2)在第二個節點上執行
cd .ssh
scp id_rsa.pub rac1:/home/oracle/.ssh/id_rsa.pub2
scp id_dsa.pub rac1:/home/oracle/.ssh/id_dsa.pub2
3)在第一個節點上執行
cat id_dsa.pub id_dsa.pub2 id_rsa.pub id_rsa.pub2>authorized_keys
chmod 644 authorized_keys
scp authorized_keys rac2:/home/oracle/.ssh
配置完成后進行測試:
ssh dwdb1
ssh dwdb1-priv
ssh dwdb2
ssh dwdb2-priv
ssh dwdb2
ssh dwdb2-priv
ssh dwdb1
ssh dwdb1-priv
ssh dwdb2-priv
ssh dwdb1-priv
ssh dwdb1
ssh dwdb2
ssh dwdb2
ssh dwdb2-priv
ssh dwdb2
ssh dwdb1-priv
ssh dwdb1
ssh dwdb1-priv
ssh dwdb1
ssh dwdb2-priv
ssh dwdb2-priv
ssh dwdb1-priv
ssh dwdb1
ssh dwdb1
./runcluvfy.sh stage -pre crsinst -n dwdb1,dwdb2
18、安裝cvudisk RPM包
cvuqdisk存于oracle GI安裝介質的cv/rpm目錄下
export CVUQDISK_GRP=asmadmin
rpm -ivh cvuqdisk-1.0.10-1.rpm
19、配置ASM盤:
OCR:8G NORMAL冗余
GIMR:至少40G 外部冗余
DATA:外部冗余
ARCH:外部冗余
root配置腳本如下:
vi asm_udev.sh
#!/bin/bash
for i in $(cat /proc/partitions | awk {'print $4'} |grep emcpower|sort);
do
echo "ACTION==\"add|change\", KERNEL==\"emcpower*\", ENV{DEVTYPE}==\"disk\",SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d --whitelisted --replace-whitespace --device=\$devnode\", RESULT==\"/usr/lib/udev/scsi_id -g -u -d --whitelisted --replace-whitespace --device=/dev/$i
\",RUN+=\"/bin/sh -c 'mknod /dev/asm-$i b \$major \$minor; chown grid:asmadmin /dev/asm-$i; chmod 0660 /dev/asm-$i'\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
chmod +x asm_udev.sh
重新加載udev
/sbin/udevadm trigger
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。