设为首页 加入收藏

TOP

以CentOS 6.8系统为例部署Oracle 11g RAC和DNS配置(六)
2018-07-13 06:07:11 】 浏览:450
Tags:CentOS 6.8 系统 部署 Oracle 11g RAC DNS 配置
---------------------------------------------
rpm -ivh pdksh-5.2.14-30.x86_64.rpm


chkconfig iptables off
service iptables stop


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


groupadd -g 2000 oinstall
groupadd -g 2200 asmadmin
groupadd -g 2201 asmdba
groupadd -g 2202 asmoper
groupadd -g 2300 dba
groupadd -g 2301 oper
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd grid
passwd oracle


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


su - oracle


[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


su - 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



----------------------------------------------------------------------------------------------


su - root


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


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

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

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目