Linux 6.4下oracle 11g RAC安装前环境配置
2014-05-02 10:00
567 查看
操作系统:redhat linux 6.4 x64
数据库: oracle 11.2.0.3 RAC
工具:SecureCRT、Xmanager 4
检查系统包
binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
expat-1.95.7
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-2.3.4-2.41 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libaio-devel-0.3.105 (32 bit)
libgcc-3.4.6
libgcc-3.4.6 (32-bit)
libstdc++-3.4.6
libstdc++-3.4.6 (32 bit)
libstdc++-devel 3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
可通过如下命令查看是否包已经安装
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel
-----------------------------
yum -y install compat-libstdc++-33
yum -y install elfutils-libelf-devel
yum -y install gcc
yum -y install gcc-c++
yum -y install glibc-devel
yum -y install glibc-headers
yum -y install ksh
yum -y install libaio-devel
yum -y install libstdc++-devel
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install compat-libcap1
安装cvu包,进入到grid解压后的目录
cd /soft/grid/rpm
rpm -ivh cvuqdisk-1.0.9-1*
1、修改hosts
如果有多个scan ip ,那么scan ip不能添加到hosts中。
如果只有一个scan ip,将scan ip添加到hosts中
vi /etc/hosts
192.168.56.101 ogg1
192.168.56.102 ogg2
10.10.10.1 oggpriv1
10.10.10.2 oggpriv2
192.168.56.201 oggvip1
192.168.56.202 oggvip2
192.168.56.110 scanip
如果在dns中配置了ip,那么就得在所有节点上更改主机的搜索顺序
vi /etc/nsswitch.conf
Old:
hosts: files nis dns
New:
hosts: dns files nis
重启服务
#/sbin/service nscd restart
2、修改limit限制
vi /etc/security/limits.conf
添加如下内容
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3、修改/etc/profile文件
添加如下内容
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
4、修改/etc/csh.login
添加如下内容
if ( $USER = "oracle" || $USER = "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif
5、配置核心参数
vi /etc/sysctl.conf
添加如下内容
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
fs.aio-max-nr = 1048576
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
配置后执行
sysctl -p
6、配置/etc/pam.d/login文件
vi /etc/pam.d/login
添加如下内容
session required pam_limits.so
7、添加用户和组
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper
/usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle
passwd oracle
passwd grid
8、创建目录
创建oracle目录
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
创建grid目录
mkdir -p /u01/app/11.2.0/grid/product/db_1
chown -R grid:oinstall /u01/app/11.2.0/grid/product/db_1
chmod -R 775 /u01/app/11.2.0/grid/product/db_1
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid
创建ORACLE_BASE目录和rdbms目录
mkdir -p /u01/app/oracle
mkdir /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1
chmod -R 775 /u01/app/oracle/product/11.2.0/db_1
9、配置raw
修改/etc/udev/rules.d/60-raw.rules 文件
添加如下内容:
ACTION=="add", KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf1",RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg1",RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw7 %N"
KERNEL=="raw[1-7]",OWNER="grid",GROUP="asmadmin" MODE="660"
添加完成后执行如下命令
start_udev
raw -qa
--partprobe
10、关闭ntp服务
使用oracle11G rac的时间同步
service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.conf.orig
rm /var/run/ntpd.pid
11、配置环境变量
su - oracle
vi .bash_profile
添加如下内容
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;
export ORACLE_SID=racdb1; (在第二个节点为racdb2)
export ORACLE_TERM=xterm;
export PATH=/usr/sbin:$PATH;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
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.ZHS16GBK;
配置结束后执行:source .bash_profile
su - grid
vi .bash_profile
添加如下内容
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_SID=+ASM1; (在第二个节点为+ASM2)
export ORACLE_BASE=/u01/app/grid;
export ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1;
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS";
export THREADS_FLAG=native;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH;
export THREADS_FLAG=native;
export PATH=$ORACLE_HOME/bin:$PATH;
配置结束后执行:source .bash_profile
11、配置互信(可以在安装grid和oracle软件的时候通过图形界面执行,建议在图形界面配置)
cd /u01/soft
unzip p10404530_112030_Linux-x86-64_3of7.zip
su - grid
cd grid/sshsetup
./sshUserSetup.sh -user grid -hosts "ogg1 ogg2" -advanced -noPromptPassphrase
cd /u01/soft
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip
su - oracle
cd /u01/soft/database/sshsetup/
./sshUserSetup.sh -user oracle -hosts "ogg1 ogg2" -advanced -noPromptPassphrase
数据库: oracle 11.2.0.3 RAC
工具:SecureCRT、Xmanager 4
检查系统包
binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
expat-1.95.7
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-2.3.4-2.41 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libaio-devel-0.3.105 (32 bit)
libgcc-3.4.6
libgcc-3.4.6 (32-bit)
libstdc++-3.4.6
libstdc++-3.4.6 (32 bit)
libstdc++-devel 3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
可通过如下命令查看是否包已经安装
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel
-----------------------------
yum -y install compat-libstdc++-33
yum -y install elfutils-libelf-devel
yum -y install gcc
yum -y install gcc-c++
yum -y install glibc-devel
yum -y install glibc-headers
yum -y install ksh
yum -y install libaio-devel
yum -y install libstdc++-devel
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install compat-libcap1
安装cvu包,进入到grid解压后的目录
cd /soft/grid/rpm
rpm -ivh cvuqdisk-1.0.9-1*
1、修改hosts
如果有多个scan ip ,那么scan ip不能添加到hosts中。
如果只有一个scan ip,将scan ip添加到hosts中
vi /etc/hosts
192.168.56.101 ogg1
192.168.56.102 ogg2
10.10.10.1 oggpriv1
10.10.10.2 oggpriv2
192.168.56.201 oggvip1
192.168.56.202 oggvip2
192.168.56.110 scanip
如果在dns中配置了ip,那么就得在所有节点上更改主机的搜索顺序
vi /etc/nsswitch.conf
Old:
hosts: files nis dns
New:
hosts: dns files nis
重启服务
#/sbin/service nscd restart
2、修改limit限制
vi /etc/security/limits.conf
添加如下内容
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3、修改/etc/profile文件
添加如下内容
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
4、修改/etc/csh.login
添加如下内容
if ( $USER = "oracle" || $USER = "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif
5、配置核心参数
vi /etc/sysctl.conf
添加如下内容
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
fs.aio-max-nr = 1048576
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
配置后执行
sysctl -p
6、配置/etc/pam.d/login文件
vi /etc/pam.d/login
添加如下内容
session required pam_limits.so
7、添加用户和组
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper
/usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle
passwd oracle
passwd grid
8、创建目录
创建oracle目录
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
创建grid目录
mkdir -p /u01/app/11.2.0/grid/product/db_1
chown -R grid:oinstall /u01/app/11.2.0/grid/product/db_1
chmod -R 775 /u01/app/11.2.0/grid/product/db_1
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid
创建ORACLE_BASE目录和rdbms目录
mkdir -p /u01/app/oracle
mkdir /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1
chmod -R 775 /u01/app/oracle/product/11.2.0/db_1
9、配置raw
修改/etc/udev/rules.d/60-raw.rules 文件
添加如下内容:
ACTION=="add", KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf1",RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg1",RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw7 %N"
KERNEL=="raw[1-7]",OWNER="grid",GROUP="asmadmin" MODE="660"
添加完成后执行如下命令
start_udev
raw -qa
--partprobe
10、关闭ntp服务
使用oracle11G rac的时间同步
service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.conf.orig
rm /var/run/ntpd.pid
11、配置环境变量
su - oracle
vi .bash_profile
添加如下内容
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;
export ORACLE_SID=racdb1; (在第二个节点为racdb2)
export ORACLE_TERM=xterm;
export PATH=/usr/sbin:$PATH;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
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.ZHS16GBK;
配置结束后执行:source .bash_profile
su - grid
vi .bash_profile
添加如下内容
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_SID=+ASM1; (在第二个节点为+ASM2)
export ORACLE_BASE=/u01/app/grid;
export ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1;
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS";
export THREADS_FLAG=native;
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH;
export THREADS_FLAG=native;
export PATH=$ORACLE_HOME/bin:$PATH;
配置结束后执行:source .bash_profile
11、配置互信(可以在安装grid和oracle软件的时候通过图形界面执行,建议在图形界面配置)
cd /u01/soft
unzip p10404530_112030_Linux-x86-64_3of7.zip
su - grid
cd grid/sshsetup
./sshUserSetup.sh -user grid -hosts "ogg1 ogg2" -advanced -noPromptPassphrase
cd /u01/soft
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip
su - oracle
cd /u01/soft/database/sshsetup/
./sshUserSetup.sh -user oracle -hosts "ogg1 ogg2" -advanced -noPromptPassphrase
相关文章推荐
- 【Oracle RAC】Linux系统Oracle 11g R2 RAC 安装配置详细过程-视频培训教程
- oracle linux 5.8安装oracle 11g rac 第二章:配置虚拟主机,环境准备
- Linux_+_Oracle_11g_R2_RAC_安装配置详细过程
- Linux + Oracle 11g R2 RAC 安装配置详细过程
- Linux + Oracle 11g R2 RAC 安装配置详细过程
- Linux_Oracle_11g_R2_RAC_安装配置详细过程
- oracle linux 5.8安装oracle 11g rac 第一章:配置实验环境
- Oracle 11g R2的Linux安装环境配置
- 在Cent OS 6.7 环境下重装系统并安装配置Oracle 11g数据库
- linux环境下安装oracle 11g database方法指导(一)
- oracle 11G RAC客户端安装和PLSQL连接配置
- Oracle 11g R2 RAC 安装时 系统用户组 配置 说明
- linux网络环境的配置(安装oracle时的安装环境的配置)
- linux环境下oracle client安装和配置
- Oracle 11g Express在Linux下安装配置注意事项
- Redhat 5.8 ORACLE 11gR2 RAC安装文档1-环境配置及准备
- Oracle-Linux安装配置python3.6环境
- Oracle 11g R2 RAC 安装时 系统用户组 配置 说明
- Linux平台 Oracle 12cR2 RAC安装Part2:GI配置
- Linux下安装Oracle 11G 软、硬件环境检测和修改