重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

InstallingOracle12cRAConLinux6

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


分享名称:InstallingOracle12cRAConLinux6
当前路径:http://cqcxhl.cn/article/ihjpcd.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP