Oracle 10g RAC Setup in Linux AS5.3 Step By Step(一)

Oracle 10.2.0.4 RAC Setup Step By Step
1.We need to configure the following items on the both nodes (node1 and node2 server)
A. Firewall
B. System Services
C. Timezone

 


If you find there do not exists ‘telnet’ service , you need setup this ‘telnet’ service . we will setup
“telnet” rpm package when we install other linux rpm packages required by Oracle installation .


2. When the both servers configuration is completed , we need to sync date time between both
server and time server , and because they are new servers , so maybe we need to adjust their hard
clock and system time .
A. you can key in ‘date ‐s hh:mm:ss’ to adjust time on both servers refer to current time .
B. Key in ‘ hwclock ‐r ; date ‘ to check the different between the hard clock and OS system time ,
then we can rsync time by running command ‘hwclock ‐‐systohc’ , at last , we need key in ‘ hwclock
‐r ; date ‘ to check again , and reboot both servers .


After rebooting both servers , double check the hard clock and OS system time .
3. We need to check the public and private network card which Oracle RAC require on both servers.
You can see 10.13.13.205/206 are public IPs and 192.168.13.205/206 are private IPs .


4. Next , we will configure ‘/etc/hosts’ file on both servers .
5. Configure linux kernel parameter ‘/etc/sysctl.conf ’ file on both servers .


6. Create Linux group and user on both servers for Oracle and clusterware setup , and configure
oracle limit and user profile on both servers .
On both server , edit ‘ /etc/security/limits.conf ’ and add the below 4 rows to limit resource of user
‘oracle’ .
On both server , edit ‘ /etc/pam.d/login ’ and add the below line .
# vi /etc/pam.d/login
session required pam_limits.so


On both servers, we need to edit file ‘ .bash_profile ’ in the home directory of user ‘oracle’ .


The .bash_profile script. like :
# .bash_profile
# Get the aliases and functions
if [ ‐f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
BASH_ENV=$HOME/.BASHRC
export BASH_ENV PATH
unset USERNAME
# Set Oracle Environment
ORACLE_HOME=/u01/product/oracle; export ORACLE_HOME
ORACLE_SID= wmb2bprd1 ; export ORACLE_SID
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/u01/product;export ORACLE_BASE
ORACLE_TERM=vt100;export ORACLE_TERM
#NLS_LANG='traditional chinese_taiwan'.ZHT16BIG5; export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
ORA_CRS_HOME=/u01/product/crs; export ORA_CRS_HOME


set ‐u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORA_NLS33=/u01/product/oracle/ocommon/nls/admin/data;export ORA_NLS33
CLASSPATH=/u01/product/oracle/jdbc/lib/classesl11.zip:/usr/local/java;
export DISPLAY=127.0.0.1:0.0
export LD_ASSUME_KERNEL=2.6.18
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORA_CRS_HOME/bin:$JAVA_HOME/bin:$PATH:.;
export PATH
alias ll='ls ‐l';
alias ls='ls ‐‐color';
alias his='history';
umask 022
7. We must check the following linux packages which Oracle RAC requrie .
OS: Red Hat Enterprise Linux Server release 5.3 (Tikanga) X86_64Bit ,
Kernel: 2.6.18‐128.el5 #1 SMP
glibc‐2.5‐24.x86_64.rpm (rpm ‐q glibc)
glibc‐common‐2.5‐24.x86_64.rpm (rpm ‐q glibc‐common)
glibc‐devel‐2.5‐24.i386.rpm (rpm ‐q glibc‐devel) (Need 32bit & 64bit rpm)
glibc‐devel‐2.5‐24.x86_64.rpm (rpm ‐q glibc‐devel)


libXp‐1.0.0‐8.1.el5.i386.rpm (rpm ‐q libXp) (Need 32bit & 64bit rpm)
libXp‐1.0.0‐8.1.el5.x86_64.rpm (rpm ‐q libXp)
binutils‐2.17.50.0.6‐6.el5.x86_64.rpm (rpm ‐q binutils)
compat‐db‐4.2.52‐5.1.x86_64.rpm (rpm ‐q compat‐db)
control‐center‐2.16.0‐16.el5.x86_64.rpm (rpm ‐q control‐center)
gcc‐4.1.2‐42.el5.x86_64.rpm (rpm ‐q gcc)
gcc‐c++‐4.1.2‐42.el5.x86_64.rpm (rpm ‐q gcc‐c++)
libstdc++‐4.1.2‐42.el5.x86_64.rpm (rpm ‐q libstdc++)
libstdc++‐devel‐4.1.2‐42.el5.x86_64.rpm (rpm ‐q libstdc++‐devel)
make‐3.81‐3.el5.x86_64.rpm (rpm ‐q make)
ksh‐20080202‐2.el5.x86_64.rpm (rpm ‐q ksh)
sysstat‐7.0.2‐1.el5.x86_64.rpm (rpm ‐q sysstat)
gnome‐screensaver‐2.16.1‐8.el5.x86_64.rpm (rpm ‐q gnome‐screensaver)
libaio‐devel‐0.3.106‐3.2.x86_64.rpm (rpm ‐q libaio‐devel)
libaio‐0.3.106‐3.2.x86_64.rpm (rpm ‐q libaio)


Review from the above picture , we need to install some linux packages, we can get these packages
from Linux 5.3 CD and we will create ‘/u01/packages’ directory to storage these packages :
libXp‐1.0.0‐8.1.el5.i386.rpm (32bit)
libXp‐1.0.0‐8.1.el5.x86_64.rpm
compat‐db‐4.2.52‐5.1.x86_64.rpm
sysstat‐7.0.2‐3.el5.x86_64.rpm
libaio‐devel‐0.3.106‐3.2.x86_64.rpm

 


On both servers , Install these Linux packages (include vsftp and telnet rpm packages) :


On both servers , key in “ setup ” to enable vsftp and telnet service if ftp and telnet does not work,
maybe you need to reboot server or restart these two service by command .
[root@mxb2bcoredb01 ~]# setup
8. Start to copy Clusterware , Oracle, ocfs2 software to the both servers (/u01/packages) .
10201_clusterware_linux_x86_64.cpio
10201_database_linux_x86_64.cpio
p6810189_10204_Linux_x86_64.zip
ocfs2‐tools‐1.4.1‐1.el5.x86_64.rpm
ocfs2‐2.6.18‐128.el5‐1.4.1‐1.el5.x86_64.rpm
ocfs2console‐1.4.1‐1.el5.x86_64.rpm

 


9. Disable SElinux on both server and reboot both servers , make it valid .
10. Make directory ‘ .ssh ’ in the oracle home on the both servers .


11. Create a ssh connection environment


12. On the first server (node1) , generate ‘authorized_keys’ between node1 and node2 server .
Then on node1 server, copy ‘authorized_keys’ file from node1 to the same directory on the node2
server .
“chmod 600 authorized_keys ” on the node2 server .
At last, we need to test ‘ssh’ between node1 and node2 server . if it does not need password , test
is successful .


13. Setup the ocfs2 software on the both servers , please notice the installation sequence .


14. Check the storage and powerpath message on the both servers .
[root@mxb2bcoredb01 ~]# powermt display dev=all
[root@mxb2bcoredb02 ~]# powermt display dev=all
You can see the message like the below picture (same on both servers):


15. We fdisk shared disk on the storage . Only need to perform. this step on Node 1 Server .


16. We need to configure VNC or other remote control tools to login Linux X‐Windows on both
servers , we will omit the process of VNC configuration .
We start to configure OCFS2 file system (Oracle Cluster File System) in X‐Windows and format shared
disk on the storage . Only need to perform. this step on Node 1 Server .


Click ‘OK’ to format the new device .
Click ‘OK’ to format the new device .


‘OK’ to format the new device .
17. Then we need to configure cluster nodes , Only need to perform. this step on Node 1 Server .


Add public hostname and private IP Address to the below form. .


At last , Click ‘apply’ to activate them , and we can see something at the ‘Active’ column .
Notes : if you encounter the error message “ Could not start cluster stack. This must be resolved before
any OCFS2 filesystem can be mounted . “ , maybe there exists problem on the OCFS2 software version ;
and if you encounter the error message like “ o2cb_ctl: Unable to access cluster service while creating
node ” , you need to check the file “/etc/ocfs2/cluster.conf” and delete all of its content .
We can check the configuration file ‘ /etc/ocfs2/cluster.conf ’ on the node1 server .


Then we need to propagate configuration to another node server (Node2) .
At last , click menu ‘ File ? Quit ’
18. Next step, we need to configure O2CB (ocfs2) and test it on the both servers .


then configure O2CB on both servers.


Test and check O2CB configuration on both servers.


19. Create some directory for oracle database and mount shared disk on the both servers .
Create directory for oracle datafile on both servers .
Create another directory for clusterware and oracle software on both servers .


On both servers
# vi /etc/fstab and configure the ocfs2 shared disk .


We can try to mount ocfs2 shared disk on the first server .
Oracle Clusterware setup .
1.At first , we must check system date and time on both servers and make sure they are same . we
will create special script. (ntp file) to synchronize time with time server (here IP of time server:
10.13.67.50 or 10.13.7.30 ) . Please configure ntpdate script. on both servers .
$ mkdir ‐p /u01/run
$ mkdir ‐p /u01/run/log
$cd run/
$vi ntp
The script. in ntp file like :
#! /bin/sh
/usr/sbin/ntpdate 10.13.7.30
And then configure crontab job (Notes: root user)
# crontab ‐e


And the below script. to crontab job
0,30 * * * * sh /u01/run/ntp 1>>/u01/run/log/ntp.log 2>>/u01/run/log/ntp.bad
At last, You can check the script. by “ # sh /u01/run/ntp ” , make sure the time of both servers is
correct and synchronous , otherwise , you will receive time stamp error message when you install
oracle clusterware .
2, Create clusterware (Oracle CRS) installation directory on both servers .


Ok, let us setup Oracle clusterware (CRS) , firstly , we need to unzip CRS software file in the
/u01/packages directory (by oracle role) , because when the crs softeware complete installation , it
will remote copy these crs files to Node2 server by ssh . Only need to perform. this step on Node 1
Server .


So we key in ‘n’ to quit the installation window , and run ‘ rootpre.sh ’ by root in another window.
Notes: oracle software installation log : /u01/product/oraInventory/logs

 


Notes : ‘ /u01/product/crs ’ is the crs software installation directory , please remember to select
‘production languages’ .


Then edit it , you can refer to ‘ /etc/hosts ’ file .

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25198367/viewspace-706211/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25198367/viewspace-706211/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值