oracle12.2RAC 配置

yum install -y binutils-
yum install -y compat-libcap1
yum install -y compat-libstdc

yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel-

yum install -y glibc
yum install -y glibc-common

yum install -y glibc-devel
yum install -y glibc-headers

yum install -y ksh-2
yum install -y libaio

yum install -y libaio-devel
yum install -y libgcc

yum install -y libstdc++
yum install -y libstdc++-devel

yum install -y make
yum install -y sysstat

yum install -y unixODBC
yum install -y unixODBC-devel

#cp /etc/sysctl.conf /etc/sysctl.conf.bak
cat >> /etc/sysctl.conf << EOF
###############
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
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
kernel.panic_on_oops = 1
fs.file-max = 6815744
EOF

groupadd --gid 1000 oinstall
groupadd --gid 1001 dba
groupadd --gid 1002 asmdba
groupadd --gid 1003 asmoper
groupadd --gid 1004 asmadmin
groupadd --gid 1005 oper
groupadd --gid 1006 backupdba
groupadd --gid 1007 dgdba
groupadd --gid 1008 kmdba
useradd --uid 1000 --gid oinstall --groups dba,oper,asmdba,asmoper,backupdba,dgdba,kmdba oracle
passwd oracle
useradd --uid 1001 --gid oinstall --groups dba,asmadmin,asmdba,asmoper grid
passwd grid

mkdir -p /u01/app/
chmod -R 775 /u01/app/
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
mkdir -p /u01/app/grid
mkdir /u01/app/12.2.0/grid/product/grid -p
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
chown -R grid:oinstall /u01/app/12.2.0
chown -R grid:oinstall /u01/app/grid
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/oracle/
chmod -R 775 /u01/app/grid

touch /etc/security/limits.d/99-grid-oracle-limits.conf
cat >> /etc/security/limits.d/99-grid-oracle-limits.conf << EOF
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
EOF

cd /etc/profile.d/
touch oracle-grid.sh

cat >> oracle-grid.sh << EOF
#Setting the appropriate ulimits for oracle and grid user
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF

grid:

export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.2.0/grid/product/grid
export PATH=$PATH:/u01/app/12.2.0/grid/product/grid/bin
export ORACLE_SID=+ASM1

oracle:
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=prod

转载于:https://blog.51cto.com/1937519/2322309

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值