手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle10.2.0.4-RAC两节点集群环境搭建

系统参数配置

[日期:2014-02-23] 来源:CSDN  作者:dbseesee [字体:大 中 小]

在节点1和节点2都配置

1、关闭防火墙和sendmail
2、关闭SELINUX
3、修改操作系统版本号
4、依赖包检查
5、创建用户和组
6、创建基本目录
7、修改Oracle用户密码
8、配置内核参数
9、limits.conf
10、pam.d
11、ulimit
12、oracle环境变量
13、rlwrap配置


具体配置如下:

1、关闭防火墙和sendmail

chkconfig iptables off

chkconfig sendmail off

2、 关闭SELINUX
[root@dbcc1 ~]# cat /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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

[root@dbcc1 ~]# cat /etc/sysconfig/selinux
# 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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted


3、 修改操作系统版本号

[root@dbcc2 ~]# ll /etc | grep relase
[root@dbcc2 ~]# ll /etc | grep release
-rw-r--r-- 1 root root 64 Feb 19 23:17 enterprise-release
drwxr-xr-x 2 root root 4096 Feb 19 20:39 lsb-release.d
-rw-r--r-- 1 root root 54 Feb 19 23:16 RedHat-release
原来是5.5 改成4.5 即可;
修改后的:
[root@dbcc2 ~]# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 4.5 (Carthage)

[root@dbcc2 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 4.5 (Tikanga)

4、依赖包检查
rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ make numactl-devel sysstat unixODBC unixODBC-devel elfutils-libelf-devel-static kernel-headers libgomp

[root@localhost ~]# rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ make numactl-devel sysstat unixODBC unixODBC-devel elfutils-libelf-devel-static kernel-headers libgomp
binutils-2.17.50.0.6-14.el5
package compat-libstdc++ is not installed
elfutils-libelf-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
gcc-4.1.2-48.el5
gcc-c++-4.1.2-48.el5
glibc-2.5-49
glibc-2.5-49
glibc-common-2.5-49
glibc-devel-2.5-49
glibc-devel-2.5-49
glibc-headers-2.5-49
ksh-20100202-1.el5
libaio-0.3.106-5
libaio-0.3.106-5
package libaio-devel is not installed
libgcc-4.1.2-48.el5
libgcc-4.1.2-48.el5
libstdc++-4.1.2-48.el5
libstdc++-4.1.2-48.el5
make-3.81-3.el5
package numactl-devel is not installed
package sysstat is not installed
package unixODBC is not installed
package unixODBC-devel is not installed
elfutils-libelf-devel-static-0.137-3.el5
kernel-headers-2.6.18-194.el5
libgomp-4.4.0-6.el5

安装对应的依赖包:
[root@localhost rpm]# ll
total 3472
-rw-r--r-- 1 root root 11790 Feb 18 2010 libaio-devel-0.3.106-5.i386.rpm
-rw-r--r-- 1 root root 11675 Feb 18 2010 libaio-devel-0.3.106-5.x86_64.rpm
-rw-r--r-- 1 root root 16772 Apr 1 2010 numactl-devel-0.9.8-11.el5.i386.rpm
-rw-r--r-- 1 root root 16839 Apr 1 2010 numactl-devel-0.9.8-11.el5.x86_64.rpm
-rw-r--r-- 1 root root 178400 Jan 22 2009 sysstat-7.0.2-3.el5.x86_64.rpm
-rw-r--r-- 1 root root 850413 Jan 22 2009 unixODBC-2.2.11-7.1.i386.rpm
-rw-r--r-- 1 root root 854883 Jan 22 2009 unixODBC-2.2.11-7.1.x86_64.rpm
-rw-r--r-- 1 root root 761234 Jan 22 2009 unixODBC-devel-2.2.11-7.1.i386.rpm
-rw-r--r-- 1 root root 818106 Jan 22 2009 unixODBC-devel-2.2.11-7.1.x86_64.rpm


[root@localhost rpm]# rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ make numactl-devel sysstat unixODBC unixODBC-devel elfutils-libelf-devel-static kernel-headers libgomp
binutils-2.17.50.0.6-14.el5
package compat-libstdc++ is not installed
elfutils-libelf-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
gcc-4.1.2-48.el5
gcc-c++-4.1.2-48.el5
glibc-2.5-49
glibc-2.5-49
glibc-common-2.5-49
glibc-devel-2.5-49
glibc-devel-2.5-49
glibc-headers-2.5-49
ksh-20100202-1.el5
libaio-0.3.106-5
libaio-0.3.106-5
libaio-devel-0.3.106-5
libaio-devel-0.3.106-5
libgcc-4.1.2-48.el5
libgcc-4.1.2-48.el5
libstdc++-4.1.2-48.el5
libstdc++-4.1.2-48.el5
make-3.81-3.el5
numactl-devel-0.9.8-11.el5
numactl-devel-0.9.8-11.el5
sysstat-7.0.2-3.el5
unixODBC-2.2.11-7.1
unixODBC-2.2.11-7.1
unixODBC-devel-2.2.11-7.1
unixODBC-devel-2.2.11-7.1
elfutils-libelf-devel-static-0.137-3.el5
kernel-headers-2.6.18-194.el5
libgomp-4.4.0-6.el5

compat-libstdc++实际上已经安装了
[root@dbcc1 ~]# rpm -qa | grep compat-libstdc++
compat-libstdc++-33-3.2.3-61
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61

再把libXp也装上:
root@localhost rpm]# ll
total 80
-rw-r--r-- 1 root root 22852 Jan 22 2009 libXp-1.0.0-8.1.el5.i386.rpm
-rw-r--r-- 1 root root 23561 Jan 22 2009 libXp-1.0.0-8.1.el5.x86_64.rpm
-rw-r--r-- 1 root root 15103 Jan 22 2009 libXp-devel-1.0.0-8.1.el5.i386.rpm
-rw-r--r-- 1 root root 15072 Jan 22 2009 libXp-devel-1.0.0-8.1.el5.x86_64.rpm


[root@localhost rpm]# rpm -ivh *
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libXp ########################################### [ 25%]
2:libXp ########################################### [ 50%]
3:libXp-devel ########################################### [ 75%]
4:libXp-devel ########################################### [100%]


[root@localhost rpm]# ll
total 7404
-rw-r--r-- 1 root root 5445186 Apr 2 2010 glibc-2.5-49.i686.rpm
-rw-r--r-- 1 root root 2117059 Apr 2 2010 glibc-devel-2.5-49.i386.rpm

[root@localhost rpm]# rpm -qa | grep glibc
glibc-2.5-49
glibc-devel-2.5-49
glibc-2.5-49
glibc-headers-2.5-49
glibc-common-2.5-49
glibc-devel-2.5-49

[root@localhost rpm]# rpm -qa | grep libstdc
compat-libstdc++-33-3.2.3-61
compat-libstdc++-296-2.96-138
libstdc++-4.1.2-48.el5
compat-libstdc++-33-3.2.3-61
libstdc++44-devel-4.4.0-6.el5
libstdc++44-devel-4.4.0-6.el5
libstdc++-4.1.2-48.el5
libstdc++-devel-4.1.2-48.el5

[root@localhost rpm]# rpm -qa | grep gcc
compat-libgcc-296-2.96-138
gcc44-4.4.0-6.el5
gcc-gfortran-4.1.2-48.el5
gcc44-gfortran-4.4.0-6.el5
libgcc-4.1.2-48.el5
gcc-4.1.2-48.el5
gcc-objc-4.1.2-48.el5
libgcc-4.1.2-48.el5
gcc-gnat-4.1.2-48.el5
gcc44-c++-4.4.0-6.el5
gcc-c++-4.1.2-48.el5

注:rpm依赖包的检查比较重要,最好提前安装完成,避免安装时出现各种异常;

 

5、创建用户和组
groupadd oinstall;
groupadd dba;
useradd -g oinstall -G dba -d /home/oracle -m -s /bin/bash -c "ORACLE" oracle;

6、创建基本目录
mkdir -p /oracle;
mkdir -p /oracle/oraInventory;
chown -R oracle:oinstall /oracle;
chmod -R 775 /oracle/;

7、修改oracle用户密码
echo "oracle"|passwd --stdin oracle

8、配置内核参数
cat>>/etc/sysctl.conf<<EOF
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
EOF

sysctl -p 使参数生效


9、limits.conf
cat>>/etc/security/limits.conf<< EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF


10、pam.d
cat>>/etc/pam.d/login<<EOF
session required /lib64/security/pam_limits.so
session required pam_limits.so
EOF

11、ulimit
cat >> /etc/profile << EOF
if [ \$USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF


12、oracle环境变量
cat >> /home/oracle/.bashrc << EOF
ORACLE_BASE=/oracle
ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=dbcc1
PATH=\$ORACLE_HOME/bin:PATH=\$PATH:\$HOME/bin
LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/usr/lib
export ORACLE_BASE
export ORACLE_HOME
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export ORACLE_SID
export PATH
export LD_LIBRARY_PATH
EOF

节点2:ORACLE_SID=dbcc2

13、rlwrap配置
rlwrap是一个sqlplus增强工具,可以让sqlplus使用方向箭

先保证安装了readline
[root@localhost rpm]# rpm -qa | grep readline
readline-devel-5.1-3.el5
readline-5.1-3.el5
readline-devel-5.1-3.el5
readline-5.1-3.el5

tar -zxvf rlwrap-0.37.tar.gz
cd rlwrap-0.37
./configure
make
make install

配置sqlplus别名,加入rlwrap文本增强操作工具
cat >> /home/oracle/.bashrc << EOF
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
EOF

linux
【内容导航】
第1页:共享存储服务端ISCSI配置 第2页:共享存储客户端ISCSI配置
第3页:本次RAC环境规划 第4页:系统参数配置
第5页:host-ssh-ntp配置 第6页:磁盘分区与asmdisk创建
第7页:Cluster和Oracle软件安装 第8页:Cluster和Oracle软件升级
第9页:dbca建库-RAC安装完成
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款