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

Practical ~ install ORACLE dual computer (ROSE-HA9.0) on REDHAT 6.5x64

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The following is a full introduction of the implementation, non-virtual machine environment. 1. Introduction to system environment configuration 1.1, operating system planning

Hostnam

Server configuration

Operating system version

Install the database version

Dual-computer software version

Jzzf-db1

E5-2609 v3x2

128GB memory

300g hard disk

Redhat linux 6.5 x64

Oracle 10.2.0.5

Rose ha 9.0

Jzzf-db2

E5-2609 v3x2

128GB memory

300g hard disk

Redhat linux 6.5 x64

Oracle 10.2.0.5

Rose ha 9.0

1.2.The IP address planning

Hostnam

IP address

Floating IP

Jzzf-db1

Eth0:10.20.160.165

Eth2:192.168.1.1

Eth3:172.16.0.1

10.20.160.101

Jzzf-db2

Eth0:10.20.160.166

Eth2:192.168.1.2

Eth3:172.16.0.2

1.3, disk planning

Hostnam

Data disk

Arbitration disk

Jzzf-db1

Sdb/sdd aggregates into / dev/mapper/oradata 1TB

Sdc/sde aggregates into / dev/mapper/vote 10GB

Jzzf-db2

Sdb/sdd aggregates into / dev/mapper/oradata 1TB

Sdc/sde aggregates into / dev/mapper/vote 10GB

2. Install ORACLE database software 2.1.Modification of host name and HOSTS file, etc.

I won't write about the specific method of revision. Just edit VI.

[root@jzzf-db1 ~] # cat / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

10.20.160.165 jzzf-db1

10.20.160.166 jzzf-db2

[root@jzzf-db1 ~] # cat / etc/sysconfig/network

NETWORKING=yes

HOSTNAME=jzzf-db1

[root@jzzf-db1 ~] # cat / etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago) / / install 10.2.0.1 first. To modify this file, see 2.2 for the modification process.

[root@jzzf-db1] # uname-a

Linux localhost.localdomain 2.6.32-431.el6.x86_64 # 1 SMP Sun Nov 10 22:19:54 EST 2013 x86 "64 GNU/Linux

[root@jzzf-db1 ~] # uname-r

2.6.32-431.el6.x86_64

[root@jzzf-db2 ~] # cat / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

10.20.160.165 jzzf-db1

10.20.160.166 jzzf-db2

[root@jzzf-db2 ~] # cat / etc/sysconfig/network

NETWORKING=yes

HOSTNAME=jzzf-db2

[root@jzzf-db2 ~] # cat / etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago)

[root@jzzf-db2] # uname-a

Linux localhost.localdomain 2.6.32-431.el6.x86_64 # 1 SMP Sun Nov 10 22:19:54 EST 2013 x86 "64 GNU/Linux

[root@jzzf-db2 ~] # uname-r

2.6.32-431.el6.x86_64

2.2. Modify each parameter configuration file of the system

[root@jzzf-db1 ~] # grep-v "^ #" / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

[root@jzzf-db2 ~] # grep-v "^ #" / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

[root@jzzf-db1 ~] # grep-v "^ #" / etc/sysctl.conf

Net.ipv4.ip_forward = 0

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

Net.bridge.bridge-nf-call-ip6tables = 0

Net.bridge.bridge-nf-call-iptables = 0

Net.bridge.bridge-nf-call-arptables = 0

Kernel.msgmnb = 65536

Kernel.msgmax = 65536

Kernel.shmmax = 68719476736

Kernel.shmall = 4294967296

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

[root@jzzf-db2 ~] # grep-v "^ #" / etc/sysctl.conf

Net.ipv4.ip_forward = 0

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

Net.bridge.bridge-nf-call-ip6tables = 0

Net.bridge.bridge-nf-call-iptables = 0

Net.bridge.bridge-nf-call-arptables = 0

Kernel.msgmnb = 65536

Kernel.msgmax = 65536

Kernel.shmmax = 68719476736

Kernel.shmall = 4294967296

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

[root@jzzf-db1 tmp] # cat / etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago)

[root@jzzf-db1 tmp] # cp / etc/redhat-release / tmp/

[root@jzzf-db1 tmp] # vi / etc/redhat-release

[root@jzzf-db1 tmp] # cat / etc/redhat-release

Redhat-4

2.3.Create ORACLE users and software installation path

Groupadd-g 6000 oinstall

Groupadd-g 6001 dba

Useradd-g oinstall-G dba-u 601 oracle

Passwd oracle

Mkdir-p / u01/app/oracle/product/10.2.0/db_1

Chown-R oracle:oinstall / u01 /

Chmod-R 775 / U01

2.4.Configuring the software packages required for yum source installation

Both nodes need to be configured

Configure YUM Feed

Mount the operating system CD to the mnt directory

[root@jzzf-db1 ~] # mount / dev/cdrom / mnt

[root@jzzf-db1 ~] # rpm--import / etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@jzzf-db1 ~] # cat / etc/yum.repos.d/local.repo

[DISK]

Name=DISK

Baseurl= file:///mnt/Server

Gpgchekc=0

Enable=1

Install the requirements package:

[root@jzzf-db1] # mount-o loop / tmp/rhel-server-6.5-x86_64-dvd.iso / mnt

Yum install-y libXp.i686 libXp.x86_64 libXp-devel.i686 libXp-devel.x86_64 libXpm.i686 libXpm-devel.i686 libXpm-devel.x86_64 libXpm.x86_64

Yum install-y libXtst.x86_64 libXtst-devel.x86_64 libXtst.i686 libXtst-devel.i686

Yum install-y binutils* compat-libstdc++-* elfutils-libelf-* elfutils-libelf-devel-* elfutils-libelf-devel-static-* gcc-* gcc-c++-* glibc-* glibc-common-* glibc-devel-* glibc-headers-* ksh libaio-* libaio-devel-* libgcc libstdc++-* libstdc++-devel make sysstat unixODBC unixODBC-devel compat-libstdc++-33.i386 compat-libstdc++-296.i386 glibc.i686 glibc-devel.i386 unixODBC.i386 unixODBC-devel.i386 libaio.i386 libaio-devel.i386 libgcc. I386 libstdc++.i386 libstdc++-devel.i386 libaio-devel.i386 libXp.i386

Yum install-y binutils* compat-db setarch compat-libstdc++-* control-center elfutils-libelf-* elfutils-libelf-devel-* elfutils-libelf-devel-static-* gcc-* gcc-c++-* glibc-* glibc-common-* glibc-devel-* glibc-headers-* ksh libaio-* libaio-devel-* libgcc libstdc++-* libstdc++-devel make sysstat unixODBC unixODBC-devel compat-libstdc++-33.i386 compat-libstdc++-296.i386 glibc.i686 glibc-devel.i386 unixODBC.i386 unixODBC-devel.i386 libaio.i386 Libaio-devel.i386 libgcc.i386 libstdc++.i386 libstdc++-devel.i386 libaio-devel.i386 libXp.i386

Yum install binutils compat-db compat-libstdc++-33 glibc glibc-devel glibc-headers gcc gcc-c++ libstdc++ cpp make libaio ksh elfutils-libelf sysstat libaio libaio-devel setarch gcc make binutils openmotif glibc setarch libaio compat-db libXp openmotif compat-libstdc++-33-3.2.3 compat-gcc-34-c++-

Cd / mnt/Packages

Rpm-ivh glibc-devel-2.12-1.132.el6.i686.rpm

2.5. Install multi-path and configure storage

[root@jzzf-db1 ~] # yum install device-mapper*

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Setting up Install Process

Package device-mapper-persistent-data-0.2.8-2.el6.x86_64 already installed and latest version

Package device-mapper-event-libs-1.02.79-8.el6.x86_64 already installed and latest version

Package device-mapper-1.02.79-8.el6.x86_64 already installed and latest version

Package device-mapper-libs-1.02.79-8.el6.x86_64 already installed and latest version

Package device-mapper-event-1.02.79-8.el6.x86_64 already installed and latest version

Resolving Dependencies

-> Running transaction check

-> Package device-mapper-multipath.x86_64 00.4.9-72.el6 will be installed

-> Package device-mapper-multipath-libs.x86_64 00.4.9-72.el6 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Device-mapper-multipath x8631 64 0.4.9-72.el6 DISK 116k

Device-mapper-multipath-libs x8631 64 0.4.9-72.el6 DISK 180k

Transaction Summary

=

Install 2 Package (s)

Total download size: 297 k

Installed size: 653 k

Is this ok [y/N]: y

Downloading Packages:

- -

Total 7.2 MB/s | 297 kB 00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

Installing: device-mapper-multipath-libs-0.4.9-72.el6.x86_64 1 Compact 2

Installing: device-mapper-multipath-0.4.9-72.el6.x86_64 2 Compact 2

Verifying: device-mapper-multipath-0.4.9-72.el6.x86_64 1 Compact 2

Verifying: device-mapper-multipath-libs-0.4.9-72.el6.x86_64 2 Compact 2

Installed:

Device-mapper-multipath.x86_64 0RO 0.4.9-72.el6 device-mapper-multipath-libs.x86_64 0RO 0.4.9-72.el6

Complete!

Configure multipath service boot boot

[root@jzzf-db2] # chkconfig-- level 35 multipathd on

[root@jzzf-db2 ~] # chkconfig-- list | grep multipathd

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

[root@jzzf-db2 /] # / etc/init.d/multipathd start

Starting multipathd daemon: [OK]

[root@jzzf-db2 /] # touch / etc/multipath.conf

[root@jzzf-db2 /] # multipath-ll

2694f7863475a3844 dm-1 INSPUR,SANVDSK

Size=10G features='0' hwhandler='0' wp=rw

| |-+-policy='round-robin 0' prio=1 status=active |

| | `- 1, sdc, 0, 0, 0, 0, sdc, active ready running. |

`- +-policy='round-robin 0' prio=1 status=enabled

`- 2 sde 0VOV 0RU 0RU 2 active ready running at 8:64

270746443556c555a dm-0 INSPUR,SANVDSK

Size=1.0T features='0' hwhandler='0' wp=rw

| |-+-policy='round-robin 0' prio=1 status=active |

| | `- 1, sdb, 0, 0, sdb, active ready running. |

`- +-policy='round-robin 0' prio=1 status=enabled

`- 2VOV 0VOUR 0UR 1 sdd 8:48 active ready running

[root@jzzf-db2 /] # grep-v "^ #" / etc/multipath.conf

Blacklist {

Devnode "^ sda"

}

Defaults {

User_friendly_names yes

}

Multipaths {

Multipath {

Wwid 2694f7863475a3844

Alias vote

Path_grouping_policy multibus

Path_selector "round-robin 0"

Failback manual

Rr_weight priorities

No_path_retry 5

}

Multipath {

Wwid 270746443556c555a

Alias oradata

Path_grouping_policy multibus

Path_selector "round-robin 0"

Failback manual

Rr_weight priorities

No_path_retry 5

}

}

[root@jzzf-db2 /] # / etc/init.d/multipathd restart

[root@jzzf-db2 /] # multipath-F

[root@jzzf-db2 /] # multipath-v2

Create: oradata (270746443556c555a) undef INSPUR,SANVDSK

Size=1.0T features='0' hwhandler='0' wp=undef

`- +-policy='round-robin 0' prio=1 status=undef

| |-1 sdb 0 sdb 8:16 undef ready running |

`- 2VOV 0VOUR 0UR 1 sdd 8:48 undef ready running

Create: vote (2694f7863475a3844) undef INSPUR,SANVDSK

Size=10G features='0' hwhandler='0' wp=undef

`- +-policy='round-robin 0' prio=1 status=undef

| |-1 sdc 0 sdc 0 0 undef ready running |

`- 2 sde 0VOV 0RU 0RU 2 undef ready running at 8:64

[root@jzzf-db2 /] # multipath-ll

Oradata (270746443556c555a) dm-0 INSPUR,SANVDSK

Size=1.0T features='1 queue_if_no_path' hwhandler='0' wp=rw

`- +-policy='round-robin 0' prio=1 status=active

| |-1 sdb 0 sdb 8:16 active ready running |

`- 2VOV 0VOUR 0UR 1 sdd 8:48 active ready running

Vote (2694f7863475a3844) dm-1 INSPUR,SANVDSK

Size=10G features='1 queue_if_no_path' hwhandler='0' wp=rw

`- +-policy='round-robin 0' prio=1 status=active

| |-1 sdc 0 sdc 0 0 active ready running |

`- 2 sde 0VOV 0RU 0RU 2 active ready running at 8:64

[root@jzzf-db2 mapper] # pwd

/ dev/mapper

[root@jzzf-db2 mapper] # ls

Control oradata vote

[root@jzzf-db1 mapper] # fdisk / dev/mapper/oradata

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x181ae45d.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w (rite)

The device presents a logical sector size that is smaller than

The physical sector size. Aligning to a physical sector (or optimal

Size boundary is recommended, or performance may be impacted.

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

Switch off the mode (command 'c') and change display units to

Sectors (command'u').

Command (m for help): n

Command action

E extended

P primary partition (1-4)

P

Partition number (1-4): 1

First cylinder (1-133674, default 1):

Using default value 1

Last cylinder, + cylinders or + size {KMagne Mpeng} (1-133674, default 133674):

Using default value 133674

Command (m for help): P

Disk / dev/mapper/oradata: 1099.5 GB, 1099511627776 bytes

255 heads, 63 sectors/track, 133674 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I take O size (minimum/optimal): 4096 bytes / 524288 bytes

Disk identifier: 0x181ae45d

Device Boot Start End Blocks Id System

/ dev/mapper/oradatap1 1 133674 107373637373 + 83 Linux

Partition 1 does not start on physical sector boundary.

Command (m for help): W

The partition table has been altered!

Calling ioctl () to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.

The kernel still uses the old table. The new table will be used at

The next reboot or after you run partprobe (8) or kpartx (8)

Syncing disks.

After creating the partition, you may need to restart to recognize the / dev/mapper/oradatap1 file

[root@jzzf-db1 mapper] # mkfs.ext4 / dev/mapper/oradatap1

Mke2fs 1.41.12 (17-May-2010)

/ dev/mapper/oradatap1 alignment is offset by 512 bytes.

This may result in very poor performance, (re)-partitioning suggested.

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=1 blocks, Stripe blocks

67108864 inodes, 268434093 blocks

13421704 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

8192 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968

102400000, 214990848

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information:

Message from syslogd@jzzf-db1 at May 12 14:04:00...

Kernel:BUG: soft lockup-CPU#6 stuck for 67s! [mkfs.ext4:11569]

Done

This filesystem will be automatically checked every 21 mounts or

180 days, whichever comes first. Use tune2fs-c or-i to override.

[root@jzzf-db1 mapper] # mkdir / oradata

[root@jzzf-db1 mapper] # chown-R oracle:dba / oradata/

[root@jzzf-db1 mapper] # chmod-R 775 / oradata/

[root@jzzf-db1 mapper] # mount / dev/mapper/oradatap1 / oradata/

[root@jzzf-db1 mapper] # chown-R oracle:dba / oradata/

[root@jzzf-db1 mapper] # chmod-R 775 / oradata/

Install ORACLE and upgrade version

1. Configure the ORACLE environment variable and modify / home/oracle/.bash_profile to add the following

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

Export ORACLE_SID=orcl

Export PATH=$PATH:$ORACLE_HOME/bin

2. Execution. .bash _ profile effective configuration

3. Switch to the ORACLE user, su-oracle, and then go to the installation directory of ORACLE10.2.01 to perform the installation

If the following prompt appears here, just continue with continue, which will be resolved when the patch is installed.

4. After the script has been executed and installed, use the ROOT user to replace the previously modified redhat-release file

Cp / tmp/redhat-release / etc/

Then go to the installation directory of 10.2.0.5 and use the ORACLE user installation patch

5. After the installation is complete, execute DBCA to create the database instance.

All files should be placed in the shared storage / oradata directory.

3. Install and configure ROSE HA dual computer 3.1and install ROSE HA 9.0

[root@jzzf-db1 RoseHA-9.0.0-9009-RHEL6-x86_64] # ls

Install resource.tar

[root@jzzf-db1 RoseHA-9.0.0-9009-RHEL6-x86_64] #. / install

RoseHA Installation

-

Version: 9.0.0 (buildno:9009)

1. Cluster Engine

2. Cluster Manager (hcc)

3. Cluster Command Line Interface (hcli)

4. Cluster User Interface for Text Window (hcuiw)

5. ALL

Q. Quit

Choose model (Sforce compart with space) you want to Install [1-4 def 5 (def), Q]: 5

You select 5:

5. ALL

Are you sure? [YJH n (def)]: y

Please specify the path to install, [/ opt/ (def)]:

Insatll...OK

Starting clusterd service: [OK]

Starting monitord service: [OK]

Starting hclid service: [OK]

[root@jzzf-db1 RoseHA-9.0.0-9009-RHEL6-x86_64] #

3.2. test the ROSE HA script

Replace the TNSNAME file and LISNTENER file in ORACLE (red italics are modified according to the actual situation)

Replace the TNSNAME.ORA file with the following:

# tnsnames.ora Network Configuration File: / u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC0))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

ORA_BC =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 10.20.160.101) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = ora_bc)

)

)

Replace the listener.ora file with the following:

# listener.ora Network Configuration File: / u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = / u01/app/oracle/product/10.2.0/db_1)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 10.20.160.101) (PORT = 1521))

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC0))

)

)

# static-set

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = ora_bc)

(ORACLE_HOME = / u01/app/oracle/product/10.2.0/db_1)

(SID_NAME = ora_bc)

)

)

1. Manually mount the file system to the / oradata directory

Mount / dev/mapper/oradatap1 / oradata

2. Manually load the sub-IP

Ifconfig eth0:1 10.20.160.101 up

3. Enter the ROSE HA directory / opt/Rose/Cluster/bin/

Execute. / ora_start.sh LISTENER

Check to see if the ORACLE instance and monitoring can be started normally. If the check is successful,

4. Enter the ROSE HA directory / opt/Rose/Cluster/bin/

Execute. / ag_oracle.bin 0

Check whether the returned result is successful, such as successfully passing the check

5. Enter the ROSE HA directory / opt/Rose/Cluster/bin/

Execute. / ora_stop.sh LISTENER

Check whether the ORACLE instance and monitoring can be stopped. If the check is successful,

3.3.Configuring ROSE HA database cluster

Ceate cluster

Welcome to patting bricks!

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