设为首页 加入收藏

TOP

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置(二)
2018-07-13 06:07:11 】 浏览:448
Tags:CentOS 6.8 系统 部署 Oracle 11g RAC DNS 配置
rt


查看name server


cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.56.101


chkconfig named on ##设置开机自启动


DNS解析服务启动


service named start
Starting named: [ OK ]


nslookup cluster-scan.kingsql.org
nslookup 192.168.56.156
nslookup 192.168.56.157
nslookup 192.168.56.158


 


 补一个rpm 包 rpm -ivh pdksh-5.2.14-30.x86_64.rpm


 


禁用防火墙,关闭防火墙服务


chkconfig iptables off
service iptables stop


 修改selinux/config内的文件


vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted


 


 创建用户和组


 


 修改用户和组的权限


mkdir -p /opt/ora11g/grid
mkdir -p /opt/ora11g/11.2.4/grid
chown -R grid:oinstall /opt
mkdir -p /opt/ora11g/oracle
chown oracle:oinstall /opt/ora11g/oracle
chmod -R 775 /opt


 


切换到oracle用户


修改环境变量


注意在配置环境变量时,两个节点的oracle_sid是不同的,要记得修改


[oracle@rac1 ~]$ vi .bash_profile
# .bash_profile


# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


# User specific environment and startup programs


PATH=$PATH:$HOME/bin


export PATH


export ORACLE_BASE=/opt/ora11g/oracle
export ORACLE_HOME=/opt/ora11g/oracle/product/11.2.4/dbhome_1
export ORACLE_SID=kingsql1 #2节点是kingsql2
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=/opt/ora11g/ogg:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/opt/ora11g/ogg:$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LANG=C
export ORACLE_UNQNAME=kingsql



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


 


切换到grid用户


修改环境变量


[grid@rac1 ~]$ vi .bash_profile
# .bash_profile


# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


# User specific environment and startup programs


PATH=$PATH:$HOME/bin


export PATH



export ORACLE_BASE=/opt/ora11g/grid
export ORACLE_HOME=/opt/ora11g/11.2.4/grid
export ORACLE_SID=+ASM1 #2节点是+ASM2
export PATH=/usr/sbin:$PATH
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



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
export LANG=C


 


切换到root用户


修改sysctl.conf文件


vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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


将修改从硬盘刷新到内存


/sbin/sysctl -p


修改/security/limits.conf文件


vi /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 1638

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/8/8
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇mysql设置不区分表名大小写 下一篇JDBC实现调用Oracle存储过程

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目