您好,登錄后才能下訂單哦!
1.修改hosts文件
vi /etc/sysconfig/network-scripts/ifcfg-eth0
#Public
192.168.1.240 node1
192.168.1.241 node2
#Virtual
192.168.1.242 node1-vip
192.168.1.243 node2-vip
#Private
192.168.0.240 node1-priv
192.168.0.241 node2-priv
#SCAN
192.168.1.245 node-cluster cluster-scan
2.關閉防火墻
service iptables stop
chkconfig iptables off
setenforce 0
3.配置SELinux為
vi /etc/selinux/config
selinux=permissive
4.添加組
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54325 asmdba
groupadd -g 54328 asmadmin
groupadd -g 54329 asmoper
5.添加用戶
useradd -u 54321 -g oinstall -G dba,oper,asmdba oracle
useradd -u 54322 -g oinstall -G dba,asmdba,asmadmin,asmoper grid
passwd oracle
passwd grid
6.配置Oracle用戶的shell限制
vi /etc/security/limits.confs
添加內容
# Grid user
grid soft nofile 2047
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728
# Oracle user
oracle soft nofile 2047
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
7.新建安裝目錄
mkdir -p /u01/app/12.1.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/
8.編輯vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so
9.刪除NTP
/sbin/service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.conf.org
rm /var/run/ntpd.pid
/etc/init.d/avahi-daemon stop
chkconfig avahi-daemon off
10.配置環境變量
vi .bash_profile
#grid用戶下
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/12.1.0/grid; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib; export CLASSPATH
export TEMP=/tmp
export TMPDIR=/tmp
#oracle
ORACLE_SID=salmandb1; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib; export CLASSPATH
export TEMP=/tmp
export TMPDIR=/tmp
11.配置存儲ASM
for i in b c d e f g ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
重新啟動服務/sbin/start_udev
然后編輯: vi /etc/rc.d/rc.local
chown -h grid:asmadmin /dev/asm-diskb
chown -h grid;asmadmin /dev/asm-diskc
chown -h grid:asmadmin /dev/asm-diskd
chown -h grid:asmadmin /dev/asm-diske
chown -h grid:asmadmin /dev/asm-diskf
chown -h grid:asmadmin /dev/asm-diskg
chmod 660 /dev/asm-diskb
chmod 660 /dev/asm-diskc
chmod 660 /dev/asm-diskd
chmod 660 /dev/asm-diske
chmod 660 /dev/asm-diskf
chmod 660 /dev/asm-diskg
忘記編輯內核參數了vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 4294967296
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
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。