Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle 10g RAC with ASM installed on RHEL5 (simplified version)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Prepare three nodes

One for SAN.

Two ORACLE RAC nodes with 2 network cards per node

2. Assign IP address

Saneth0 10.0.0.1

C1eth0 192.168.33.101 eth0:1 192.168.33.201

C2eth0 192.168.33.102eth0:1 192.168.33.202

Add a virtual IP to eth0 using the following command

Ifconfig eth0:1 192.168.33.201 netmask 255.255.255.0

Ifconfig eth0:1 192.168.33.202 netmask 255.255.255.0

If the configuration is wrong, use the following command to delete

Ip addr del 192.168.33.202 dev eth2

3. Install ntp server as a cluster clock timing system, which can be installed on ipsan devices.

On san, edit / etc/ntp.conf

Retrict default nomodify

Restrict 127.0.0.1

Server 127.127.1.0

Fudge 127.127.1.0 stratum 8

Driftfile / var/lib/ntp/drift

Broadcastdelay 0.008

Then restart the ntpd service

Service ntpd restart

You can synchronize the clock on C1 and c2 hosts.

Crontab-e

* / 5 * / usr/sbin/ntpdate xxxxx

Synchronize every five minutes

4. Modify kernel parameters on C1 and c2

Vim / etc/sysctl.conf

Net.ipv4.ip_forward = 1

Net.ipv4.conf.default.rp_filter = 1

Net.ipv4.conf.default.accept_source_route = 0

Kernel.sysrq = 0

Kernel.core_uses_pid = 1

Net.ipv4.tcp_syncookies = 1

Kernel.msgmnb = 65536

Kernel.msgmax = 65536

Kernel.shmmax = 2147483648

Kernel.shmall = 268435456

Kernel.shmmni = 4096

Kernel.shmall = 2097152

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

5. Create oracle users and dba and oinstall user groups

Groupadd oinstall

Groupadd dba

Useradd-m-g oinstall-G dba oracle

6. Edit / etc/hosts file

Vim / etc/hosts

127.0.0.1localhost

192.168.33.101c1

192.168.33.201c1-vip

10.0.0.2c1-priv

192.168.33.102c2

192.168.33.202c2-vip

10.0.0.3c2-priv

10.0.0.1san

Copy this content on C1 and c2

7. All nodes should be configured with hangcheck-timer: used to monitor whether the Linux kernel hangs

Vim / etc/modprobe.conf

Options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

Vim / etc/rc.local

Modprobe hangcheck-timer

Check to see if the hangcheck-timer module is loaded:

Lsmod | grep hangcheck_timer

8. Configure oracle users' mutual trust between two computers (multiple computers).

Su-oracle

Ssh-keygen-t rsa

Ssh-keygen-t dsa

Cd .ssh

Cat * .pub > authorized_keys

And then each node carries out

Append to cat * .pub > authorized_keys

9. Configure ipsan

On the san host

Yum-y install scsi-target-utils

Yum-y install iscsi-initiator-utils

Vim / etc/tgt/targets.conf

Backing-store / dev/sdb1

Vender_id IET

Product_id V1

Backing-store / dev/sdc1

Vender_id IET

Product_id V2

Backing-store / dev/sdd1

Vender_id IET

Product_id V3

Backing-store / dev/sde1

Vender_id IET

Product_id V4

Backing-store / vote/disk1.img

Vender_id IET

Product_id V5

Backing-store / vote/disk2.img

Vender_id IET

Product_id V6

Service tgtd restart

Chkconfig tgtd on

10. Import the public storage of ipsan

Yum install iscsi-initiator-utils-y

Service iscsid start

Iscsiadm-m discovery-t st-p san

Service iscsi start

Chkconfig iscsid on

Chkconfig iscsi on

11. Install dependency packages C1, c2

Yum install binutilscompat-libstdc++elfutils-libelfelfutils-libelf-develglibcglibc-commonglibc-develglibc-headersgccgcc-c++libaiolibaio-devel libgcclibstdc++libstdc++-develmakesysstatunixODBCunixODBC-devel-y

12. Install oracleasm package C1, c2

Rpm-ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.7-1.el5.x86_64.rpm

13. Install cluster

Cd / mnt/clusterware/cluvfy/

. / runcluvfy.sh stage-pre crsinst-nc1,c2-verbose

Cd / mnt/clusterware/

. / runInstaller-ignoreSysPrereqs

On the Specify Home Details page

Manually modify the crs installation end point: / u01/crs_1

On the Specify Cluster Configuration page

Specify two nodes

C1c1-privc1-vip

C2c2-privc2-vip

On the Specify Network Interface Usage page

Eth0192.168.33.0Public

Eth010.0.0.0Private

On the Specify Oracle Cluster Registry (OCR) Location page

Designation

External Redundancy

Specify OCR Location: / dev/raw/raw1

On the Specify Voting Disk Location page

Designation

External Redundancy

Voting Disk Location: / dev/raw/raw2

14. Follow-up work on installation of cluster

Run on C1

/ u01/app/oracle/oraInventory/orainstRoot.sh

Run on c2

/ u01/app/oracle/oraInventory/orainstRoot.sh

Modify two scripts on both nodes to avoid bug

Vim / u01/crs_1/bin/vipca

LD_ASSUME_KERNEL=2.4.19

Export LD_ASSUME_KERNEL

Fi

Unset LD_ASSUME_KERNEL

Vim / u01/crs_1/bin/srvctl

Export LD_ASSUME_KERNEL

Unset LD_ASSUME_KERNEL

Run on C1

/ u01/crs_1/root.sh

Run on c2

/ u01/crs_1/root.sh

Running / u01/crs_1/root.sh on the last node will report an error

Running vipca (silent) for configuring nodeapps

Error 0 (Native: listNetInterfaces: [3])

[Error 0 (Native: listNetInterfaces: [3])]

You need to set the IP of oracle manually:

Cd / u01/crs_1/bin

-

. / oifcfg iflist

Eth0 192.168.33.0

Eth0 192.168.33.0

. / oifcfg setif-global eth0/192.168.33.0:public

. / oifcfg setif-global eth0:1/192.168.33.0:cluster_interconnect

. / oifcfg getif

Eth0 192.168.33.0 global public

Eth0:1 192.168.33.0 global cluster_interconnect

Run vipca

/ u01/crs_1/bin/vipca

Specify IP in Step2

C1c1-vip192.168.1.201255.255.255.0

C2c2-vip192.168.1.202255.255.255.0

If you find that the ons service cannot be started during startup, you can ignore it for the time being and start it after restarting the host.

If you encounter a CRS-0184 error

You can try to restart the CRS daemon / etc/rc.d/init.d/init.crs start

If you have a problem, you can try to check / var/log/messages to view system-level errors.

After both scripts are run, cluster is installed.

Then use crs_stat-t to check the status. If it's all ONLINE, it's normal.

15. Install the Oracle database engine

On the Select Installation Type page

Select Enterprise Edition

On the Specify Home Details page

Fill in Path: / u01/app/oracle/product/10.2.0/db_1

In Specify Hardware Cluster Installation Mode

Check two nodes C1 and c2

On the Select Configuration Option page

Select Install database Software only

After installation, run on C1 and c2 successively

/ u01/app/oracle/product/10.2.0/db_1/root.sh script

16. Install the ASM database instance

Configure oracleasm on C1

/ etc/init.d/oracleasm configure

First create an oracleasm disk on C1

/ etc/init.d/oracleasm createdisk D1 / dev/sdb1

/ etc/init.d/oracleasm createdisk D2 / dev/sdc1

/ etc/init.d/oracleasm createdisk D3 / dev/sdd1

/ etc/init.d/oracleasm createdisk D4 / dev/sde1

Configure oracleasm on c2

/ etc/init.d/oracleasm configure

Scan for oracleasm changes on c2

/ etc/init.d/oracleasm scandisks

Create an ASM instance with dbca in C1

Select D1, D2, D3, D4, select Normal mode

Create a database on ASM

Start dbca

Slightly

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report