oracle 10 g RACクラスタインストール導入の事前準備
8061 ワード
、
:
:RHEL5U8 x86_64
ORACLE :ORACLE 10.2.1
IP
odb1 192.168.100.144
192.168.101.144
odb2 192.168.100.143
192.168.101.143
Selinux/iptables
、
odb1 odb1-priv odb1-vip
obd2 odb2-priv odb2-vip
yum , ,oracleRAC , , rpm
oracle oinstall dba
, virtualbox , EMC netapp
data×2 10G
ocr×2 512M
virdisk×3 512M
oracle11g virtualdis asm
,
SSH ,
SSH , SSH SSH , oracle
raw( ) , RAC
raw chmodchown
: raw , ,
: A RAW1 port1, B RAW1 port1, 。
, oracle
、
1. oracle
[root@rac2 ~]# groupadd oinstall
[root@rac2 ~]# groupadd dba
[root@rac2 ~]# useradd -d /home/oracle -g oinstall -G dba -s /bin/bash oracle
[root@rac2 ~]# echo "123.com" | passwd --stdin oracle
[root@rac1 oracle]# echo "123.com" | passwd --stdin oracle
Changing password foruser oracle.
passwd: all authentication tokens updated successfully.
[root@rac1 oracle]#
2. , hosts
[root@odb1 ~]# hostname
odb1
:hostnameodb1
:vim /etc/sysconfig/network
hots , , scp
[root@odb1 ~]# cat /etc/hosts
127.0.0.1 localhost
192.168.100.144 odb1
192.168.100.143 odb2
192.168.101.144 odb1-priv
192.168.101.143 odb2-priv
192.168.100.252 odb1-vip
192.168.100.253 odb2-vip
[root@odb1 ~]#
3. yum , yum , ,scp
mount/dev/cdrom/mnt
yum , RHEL5.x yum ,rpm , yum
[root@odb1 ~]# cat /etc/yum.repos.d/opensource.repo
[opensource]
name=opensource
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[opensource1]
name=opensource1
baseurl=file:///mnt/VT
enabled=1
gpgcheck=0
[opensource2]
name=opensource2
baseurl=file:///mnt/Cluster
enabled=1
gpgcheck=0
[root@odb1 ~]#
4. , , ,
LVM :pvcreate cgcreate lvcreate
, ;
root@rac1 /home]# cat /etc/sysconfig/rawdevices
# raw device bindings
# format:
#
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5
/dev/raw/raw1/dev/sdb1
/dev/raw/raw2/dev/sdc1
/dev/raw/raw3/dev/sdd1
/dev/raw/raw4/dev/sde1
/dev/raw/raw5/dev/sdf1
/dev/raw/raw6/dev/sdg1
/dev/raw/raw7/dev/sdh1
[root@rac1 /home]#
[root@rac1 /home]# cat /etc/udev/rules.d/60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sdh", RUN+="/bin/raw /dev/raw/raw7 %N"
[root@rac1 /home]#
[root@rac1 /home]# /etc/rc.d/init.d/rawdevices restart
Assigning devices:
/dev/raw/raw1--> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2--> /dev/sdc1
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3--> /dev/sdd1
/dev/raw/raw3: bound to major 8, minor 49
/dev/raw/raw4--> /dev/sde1
/dev/raw/raw4: bound to major 8, minor 65
/dev/raw/raw5--> /dev/sdf1
/dev/raw/raw5: bound to major 8, minor 81
/dev/raw/raw6--> /dev/sdg1
/dev/raw/raw6: bound to major 8, minor 97
/dev/raw/raw7--> /dev/sdh1
/dev/raw/raw7: bound to major 8, minor 113
done
[root@rac1 /home]#
[root@odb1 ~]# chown -R root:oinstall /dev/raw/raw[1-2]
[root@odb1 ~]# chown -R oracle:oinstall /dev/raw/raw[3-5]
[root@odb1 ~]# chown -R oracle:dba /dev/raw/raw[6-8]
[root@odb1 ~]# chmod 660 /dev/raw/raw*
[root@odb1 ~]# vim /etc/udev/rules.d/50-udev.rules
KERNEL=="raw[1-7]", OWNER="oracle"GROUP="dba", MODE="0660"
5. SSH
, RAC
[oracle@odb1 ~]$ ssh-keygen -t rsa
[oracle@odb1 ~]$ cd.ssh/
[oracle@odb1 .ssh]$ ssh-copy-id-i id_rsa.pub [email protected]
[oracle@odb1 .ssh]$ ssh-copy-id-i id_rsa.pub [email protected]
, , SSH , yes
RAC ,
oracle
sshodb1
sshodb2
sshodb1-priv
sshodb2-priv
6.yum oracle
yum -y installinstallcompat-db.* binutils* binutils-devel.* control-center.* control-center-devel.* control-center.* gcc gcc-c++ glibc-utils glibc.* glibc-common.* glibc-devel.* glibc-headers.* compat-glibc.* glibc-common libstdc++.* libstdc++-devel.* libstdc++44-devel.* makesetarch installcompat-db.* compat-db binutils control-center gcc gcc-c++ glibc glibc-devel glibc-common libstdc++ libstdc++-devel makeopenmotif setarch libaio compat-libstdc++ compat-gcccompat- libXp openmotif22 compat-db
7.
su - oracle
vim .bashrc , SID
exportORACLE_BASE=/u01/app/oracle
exportORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
exportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH
exportORACLE_OWNER=oracle
exportORACLE_SID=odb1
exportORACLE_TERM=vt100
exportTHREADS_FLAG=native
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
exportLANG=en_US
umask022
8.
[root@odb1 ~]# mkdir /u01
[root@odb1 ~]# chown oracle:oinstall /u01/ -R
[oracle@odb1 ~]$ mkdir$ORACLE_BASE/admin-p
[oracle@odb1 ~]$ mkdir-p $ORACLE_HOME
[oracle@odb1 ~]$ mkdir-p $ORA_CRS_HOME
[oracle@odb1 ~]$ mkdir-p $ORACLE_BASE/oradata/r10g
9. oracle ( )
cat/etc/security/limits.com
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
10. oracle pam
cat/etc/pam.d/login
session required /lib/security/pam_limits.so
11.
vim /etc/sysctl.conf
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
sysctl -p
12. hangcheck time
vim /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
:modprobe -vhangcheck-timer
13. NTP , inetrnet
ntpdate ntp.api.bz
NTP , ;
crontab-e
* 1 * * * ntpdate -s ntp.api.bz
, RAC