Step-to-Step Installation of 10G RAC on RedHat AS 3.0 – Single Node(qiangtang)

chenmolin發表於2004-11-11

Operating System:RedHat Advanced Server 3.0 with update 3

Oracle RDBMS: Oracle Standard Edition 10.1.0.3 RAC

Cluster Ready Services (CRS): Oracle Cluster File System (OCFS)

Database Files:   Oracle’s Automatic Storage Management (ASM)

[@more@]

l        Setup RedHat Advanced Server 3.0 with update 3

1.       Install RHAS3.0 (update 3), make sure “no filrewall” is selected.

       Partitions

    /dev/hda1         256MB     /boot

    /dev/hda5       8192MB     /

    /dev/hda6       5120MB     /usr

    /dev/hda2       10240MB     /u01

    /dev/hda7       1024MB     SWAP

2.       After installation, check if following packages installed, if not, install them.

make-3.79.1

gcc-3.2.3-34

glibc-2.3.2-95.20

compat-db-4.0.14-5

compat-gcc-7.3-2.96.128

compat-gcc-c++-7.3-2.96.128

compat-libstdc++-7.3-2.96.128

compat-libstdc++-devel-7.3-2.96.128

openmotif21-2.1.30-8

setarch-1.3-1

3.       Configure an IP alias as private network interface by copy /etc/sysconfig/network-scripts/ifcfg.eth0 to /etc/sysconfig/network-scripts/ifcfg.eth1, then modify DEVICE and IPADDR as follows:

DEVICE=eth0:1

IPADDR=192.168.203.226

Edit /etc/hosts as follows:

192.168.203.219      dbtest1         # public IP address

10.0.0.1               dbtest1prv      # private IP address

192.168.203.244      dbvip           # virtual IP address

Restart network by execute service network restart.

Note: Use fixed IP address.

4.       Run fdisk to create two partitions for CRS and database files.

/dev/hda3           512MB

/dev/hda8           4096MB

5.       Create group and user

# mkdir –p /u01/app/oracle

# /usr/sbin/groupadd dba

# /usr/sbin/useradd –g dba –d /u01/app/oracle oracle

# chown –R oracle.dba /u01/app/oracle

# chmod –R 775 /u01/app/oracle

# mkdir –p /u01/crs/oracle/product/10.1.0/crs

# chown –R oracle.dba /u01/crs/oracle

# chmod –R 755 /u01/crs/oracle

# su – oracle

$ echo “export ORACLE_BASE=/u01/app/oracle” >> ~/.bash_profile

$ echo “umask 022” >> ~/.bash_profile

6.       Configure SSH

# su – oracle

$ mkdir ~/.ssh

$ chmod 755 ~/.ssh

$ /usr/bin/ssh-keygen –t dsa

$ cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys

$ chmod 644 ~/.ssh/authorized_keys

Add following lines to ~/.ssh/config file

    Host *

        ForwardX11 no

$ ssh dbtest1 hostname (should no password prompt)

7.       Configure kernel parameters and shell limits

Add following lines to /etc/sysctl.conf file:

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

# /sbin/sysctl -p

Add following lines to /etc/security/limits.conf file:

oracle              soft    nproc   2047

oracle              hard    nproc   16384

oracle              soft    nofile  1024

oracle              hard    nofile  65536

 

Add or edit follow line in the /etc/pam.d/login file:

        session     required            /lib/security/pam_limits.so

Add following lines to /etc/profile:

if [ $USER = "oracle" ]; then

        if [ $SHELL = "/bin/ksh" ]; then

              ulimit -p 16384

              ulimit -n 65536

        else

              ulimit -u 16384 -n 65536

        fi

fi

8.       Installing and configuring OCFS

Download following OCFS rpms from

ocfs-2.4.21-EL-1.0.12-1.i686.rpm

ocfs-support-1.0.10-1.i386.rpm

ocfs-tools-1.0.10-1.i386.rpm

Install OCFS rpms

# rpm –Uvh ocfs-2.4.21-EL-1.0.12-1.i686.rpm ocfs-support-1.0.10-1.i386.rpm   ocfs-tools-1.0.10-1.i386.rpm

# ocfstool

 - Select "Task" - Select "Generate Config"

 - Select the interconnect interface (private network interface)

     In my example for rac1pub I selected: eth0, dbtest1

 - Confirm the values displayed and exit

# /sbin/load_ocfs

# /sbin/lsmod | grep ocfs

# mkfs.ocfs -F -b 128 -L /u02/oradata/orcl -m /u02/oradata/orcl -u `id -u oracle` -g `id -g oracle` -p 0775 /dev/hda3

# mkdir –p /u02/oradata/orcl

# chown oracle:dba /u02/oradata/orcl

# chmod 775 /u02/oradata/orcl

# mount –t ocfs /dev/hda3 /u02/oradata/orcl

Add following line to /etc/fstab

/dev/hda3     /u02/oradata/orcl    ocfs   _netdev 0 0

To make sure the ocfs.o kernel module is loaded and the OCFS file systems are mounted during the boot process, enter:

# chkconfig --list ocfs

ocfs            0:off   1:off   2:off   3:on    4:on    5:on    6:off

If the flags are not set to "on" as marked in bold, run the following command:

# chkconfig ocfs on

9.       Installing and configuring ASM

       Download following OCFS rpms from

oracleasm-2.4.21-EL-1.0.0-1.i686.rpm

oracleasmlib-1.0.0-1.i386.rpm

oracleasm-support-1.0.2-1.i386.rpm

# rpm –Uvh oracleasm-2.4.21-EL-1.0.0-1.i686.rpm oracleasm-support-1.0.2-1.i386.rpm oracleasmlib-1.0.0-1.i386.rpm

To load the ASM driver oracleams.o and to mount the ASM driver filesystem, enter:

# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.

                                                      

This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting  without typing an

answer will keep that current value.  Ctrl-C will abort.

                                                                                                                          

Default user to own the driver interface []: oracle

Default group to own the driver interface []: dba

Start Oracle ASM library driver on boot (y/n) [n]: y

Fix permissions of Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration            [  OK  ]

Creating /dev/oracleasm mount point                           [  OK  ]

Loading module "oracleasm"                                     [  OK  ]

Mounting ASMlib driver filesystem                             [  OK  ]

Scanning system for ASM disks                                  [  OK  ]

# /etc/init.d/oracleasm createdisk VOL1 /dev/hda8

10.   Configuring the “hangcheck-timer” kernel module

# echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modules.conf

# modprobe hangcheck-timer

l        Install Oracle 10G Cluster Ready Services (CRS) 10.1.0.2

To install CRS, insert the "Cluster Ready Services (CRS) R1 (10.1.0.2)" CD.

    $ ssh dbtest1 hostname        # Make sure ssh works

$ export ORACLE_HOME=/u01/crs/oracle/product/10.1.0/crs

    $ /mnt/cdrom/runInstaller

- File Locations:

                       Destination Name: OraCr10g_home1

                       Destination Path: /u01/crs/oracle/product/10.1.0/crs

- Cluster Configuration:

                       Cluster Name: crs

                       Cluster Nodes: Public Node Name: dbtest1   Private Node Name: dbtest1prv

- Oracle Cluster Registry:

                       OCR Location: /u02/oradata/orcl/OCRFile

-   Voting Disk:    

                   Voting disk file name: /u02/oradata/orcl/CSSFile

Before running the root.sh script, change permissions on the parent directories of the CRS home directory to permit only the root user to write to those directories.

# chmod go-w /u01/crs/oracle/product/10.1.0

# chmod go-w /u01/crs/oracle/product

# chmod go-w /u01/crs/oracle

# chmod go-w /u01/crs

# chmod go-w /u01

# unset ORACLE_HOME

$ /u01/crs/oracle/product/10.1.0/crs/bin/olsnodes –n

dbtest1 1

l        Install Oracle 10G Software 10.1.0.2 with RAC

Insert the Oracle Database 10g R1 (10.1.0.2) CD.

    $ ssh dbtest1 hostname        # Make sure ssh works

    $ /mnt/cdrom/runInstaller

- File Locations: 

                     Destination Name: raDb10g_home1

                     Destination Path: /u01/app/oracle/product/10.1.0/db_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/41224/viewspace-780382/,如需轉載,請註明出處,否則將追究法律責任。

相關文章