这是我安装过程得步骤,由于是在服务器上写的,没有中文,但写得都是些土洋文,应该比较容易看。
我安装的时候主要是按照:piner在本论坛发表的文章和一位叫aman网友写的安装工略,非常谢谢他们的帮助。
Installation of Oracle 9i Real Application Cluster
Platform:
Oracle Version: Oracle 9.2.0.4
Server Nodes: two IBM Server x335
Paltform: RedHat Advanced Server 3.0
Name and Ip address: oadbs1 202.205.16.71
oadbs2 202.205.16.72
San: IBM FastT200
I.Preparation
1.Linux Server (every server node shuold do the following)
a.Oracle 9i patch for Rh AS3.0:
Login as root and download the patch for Rh AS3.0 (p3006854_9204_LINUX.zip)
#tar zxvf p3006854_9204_LINUX.zip
#cd 3006854
#./rhel3_pre_install.sh
b.Install the needed rpms:
#rpm -ivh compat-db-4.0.14-5.i386.rpm
#rpm -ivh compat-gcc-7.3-2.96.122.i386.rpm
#rpm -ivh compat-gcc-c++-7.3-2.96.122.i386.rpm
#rpm -ivh compat-glibc-7.x-2.2.4.32.5.i386.rpm
#rpm -ivh compat-libstdc++-7.3-2.96.122.i386.rpm
#rpm -ivh compat-libstdc++-devel-7.3-2.96.122.i386.rpm
#rpm -ivh ncurses4-5.0-5.i386.rpm
c.Relink the gcc:
#cd /usr/bin
#mv gcc gcc323
#ln -s gcc296 gcc
#mv g++ g++323
#ln -s g++296 g++
d.Edit the server kernel parameters:
#cd /etc/rc.d
#vi root.sh
#!/bin/bash
echo "Configing the kernel parameter for Oracle"
echo 100 256 100 100 > /proc/sys/kernel/sem
echo 2147483648 > /proc/sys/kernel/shmmax
echo 100 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u 16384
#chmod 755 root.sh
#./root.sh
To use these parameters on every system bootup, add this line to rc.sysinit
#vi rc.sysinit
#!/bin/bash
......
......
/etc/rc.d/root.sh
e.Add Oracle user and group:
#groupadd dba
#useradd oracle -g dba -G dba
Attention: make sure that the oracle id and dba gid should be same in every server node.
f.Configure the network properties:
add resolv name to /etc/hosts
#vi /etc/hosts
......
202.205.16.71 oadbs1.bbi.edu.cn oadbs1
202.205.16.72 oadbs2.bbi.edu.cn oadbs2
add the following lines to /etc/sysctl.conf
#vi /etc/sysctl.conf
.......
.......
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
g.Configure the env variable
Add the following lines to /etc/profile
#vi /etc/profile
ORACLE_OWNER=oracle
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/9.2.0
OACLE_DOC=/opt/oracle/doc
ORACLE_SID=oadbs0
ORACLE_TERM=vt100
export ORACLE_OWNER ORACLE_BASE ORACLE_HOME ORACLE_DOC ORACLE_SID ORACLE_TERM
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
LD_ASSUME_KERNEL=2.4.1
export LD_LIBRARY_PATH LD_ASSUME_KERNEL
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/usr/sbin:/sbin
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
NLS_LIBRARY_PATH=$ORACLE_HOME/lib
NLS_LANG=american_america.ZHS16GBK
THREADS_FLAG=native
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib:$ORACLE_HOME/rdbms/jlib
TMPDIR=/tmp
ORACLE_SID=oadbs1
export PATH ORA_NLS33 NLS_LIBRARY_PATH NLS_LANG CLASSPATH TMPDIR THREADS_FLAG ORACLE_SID
Then reload the server to check the env taken effect.
2.Using ocfs
a.load hangcheck-timer:
add this line to /etc/modules.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
#insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
b.rpm the the packages(on every server node):
#rpm -ivh ocfs-2.4.21-EL-smp-1.0.12-1.i686.rpm
#rpm -ivh ocfs-tools-1.0.10-1.i386.rpm
#rpm -ivh ocfs-support-1.0.10-1.i386.rpm
#rpm -ivh ocfs-tools-debuginfo-1.0.10-1.i386.rpm
#ocfs_uid_gen -c
Then the /etc/ocfs.conf will be like this:
#
# ocfs config
# Ensure this file exists in /etc
#
node_name = oadbs1.bbi.edu.cn
ip_address = 202.205.16.71
ip_port = 7000
comm_voting = 1
guid = 5F52CFCE80E8FAA70C25000D601B1D46
#/sbin/load_ocfs
c.Mounting filesystem(on one node):
Make sure the SAN is correctly connect the every server node.
#fdisk /dev/sdb
make /dev/sdb1 to be a logical disk
#mkfs.ocfs -F -b 128 -L oradata -m /var/opt/oracle/oradata/ \
-u `id -u oracle` -g `id -g oracle` -p 0775 /dev/sdb1
add this line to /etc/fstab on every server node:
#mkdir -p /var/opt/oracle/oradata
#chown -R oracle:dba /var/opt/oracle
#vi /etc/fstab
.....
/dev/sdb1 /var/opt/oracle/oradata ocfs_netdev 0 0
reload the server to check if the filesystem mounted correctly.
3.Set up the rsh server(on every server node):
Install the rpm package:
#rpm -ivh rsh-server-0.17-17.i386.rpm
#vi /etc/xinetd.d/rsh
....
disable = no
....
#vi /home/oracle/.rhost
oadbs1 oracle
oadbs2 oracle
#/etc/init.d/xinetd restart
use this command to check the rsh server run correctly:
[oracle@oadbs1 compat]$rsh oadbs2 ls /
II.Installing the Oracle Cluster Manager(on one server node)
#mkdir -p /opt/oracle/product/9.2.0
#chown -R oracle:dba /opt/oracle/
#dd if=/dev/zero of=/var/opt/oracle/oradata/CMQuorumFile bs=1024 count=1024
#chown oracle:dba /var/opt/oracle/oradata/CMQuorumFile
#su oracle
$export DISPLAY=10.192.1.155:0
$cd /export/home0/oracle/Disk1/
$./runInstaller
choose " Oracle Cluster Manager 9.2.0.4.0"
Public Node Information:
public node1: oadbs1
public node2: oadbs2
Private Node Information:
private node1: oadbs1
private node2: oadbs2
Quorum Disk Information: /var/opt/oracle/oradata/orcl/CMQuorumFile
when installation is completed, every server node will have the ocm,then run the following on every server node:
$cd $ORACLE_HOME/oracm/admin/
$vi cmcfg.ora
ClusterName=Oracle Cluster Manager, version 9i
MissCount=210
PrivateNodeNames=oadbs1 oadbs2
PublicNodeNames=oadbs1 oadbs2
ServicePort=9998
KernelModuleName=hangcheck-timer
CmDiskFile=/var/opt/oracle/oradata/CMQuorumFile
HostName=oadbs1
run the ocm as root on every node:
$su
#cd $ORACLE_HOME/oracm/bin
#./ocmstart.sh
use `ps -ef` to check if the oracm is running on every server node.
III.Installing the Real Application Clusters(on one sever node)
#su oracle
$vi /var/opt/oracle/srvConfig.loc
srvconfig_loc=/var/opt/oracle/oradata/SharedSrvctlConfigFile
$cd /export/home0/oracle/Disk1
$export DISPLAY=10.192.1.155:0
$./runInstaller
Welcome Screen: "Click Next"
Cluster Node Selection: select all the nodes then click next.
if not all the nodes you want to install display on this screen,
you should abort to check if all the nodes run the oracm correctly.
select "Enterprise Edition"
select "Software Only"
and then start install
IV. Installing Data base:
$srvconfig -init
$gsdctl start (on every server node)
$vi $ORACLE_HOME/network/admin/listener.ora
lsnr1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.205.16.71)(PORT = 1521))
)
)
)
lsnr2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.205.16.72)(PORT = 1521))
)
)
)
$vi $ORACLE_HOME/network/admin/tnsnames.ora
oadbs=
(description=
(failover=on)
(load_balance=on)
(address_list=
(address=(protocol=tcp)(host=202.205.16.71)(port=1521))
(address=(protocol=tcp)(host=202.205.16.72)(port=1521))
)
(connect_data=(service_name=oadbs))
)
oadbs1=
(description=
(address_list=
(address=(protocol=tcp)(host=202.205.16.71)(port=1521))
)
(connect_data=(service_name=oadbs)
(instance_name=oadbs1)
)
)
oadbs2=
(description=
(address_list=
(address=(protocol=tcp)(host=202.205.16.72)(port=1521))
)
(connect_data=
(service_name=oadbs)
(instance_name=oadbs2)
)
)
$dbca -datafileDestination /var/opt/oracle/oradata
select all the nodes you want to install.
"new database"
....
create database.
V.test the Rac server.
1.mount the database on every server node:
$sqlplus /nolog as sysdba
SQL>startup
2.start listener on every server node:
$lsnrctl start
3.test the server
$lsnrctl status
Services Summary...
Service "oadbs" has 2 instance(s).
Instance "oadbs1", status READY, has 1 handler(s) for this service...
Instance "oadbs2", status READY, has 1 handler(s) for this service...
Service "oadbsXDB" has 2 instance(s).
Instance "oadbs1", status READY, has 1 handler(s) for this service...
Instance "oadbs2", status READY, has 1 handler(s) for this service...
The command completed successfully
$tnsping oadbs
Used TNSNAMES adapter to resolve the alias
Attempting to contact (description= (failover=on) (load_balance=on) (address_list= (address=(protocol=tcp)(host=202.205.16.71)(port=1521)) (address=(protocol=tcp)(host=202.205.16.72)(port=1521))) (connect_data=(service_name=oadbs)))
OK (0 msec)
Installation Complete! Good Luck!
安装的时候一定要在前期工作做好。 |