InstallingOracle12cRAConLinux6-创新互联

1.修改hosts文件

创新互联建站10多年企业网站建设服务;为您提供网站建设,网站制作,网页设计及高端网站定制服务,企业网站建设及推广,对成都门窗定制等多个领域拥有丰富的网站推广经验的网站建设公司。

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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享名称:InstallingOracle12cRAConLinux6-创新互联
本文链接:http://azwzsj.com/article/eiphg.html