Install and configure Rose ha

Source: Internet
Author: User
Tags stop script

Install and configure Rose ha

1.1.1 install Rose ha

Copy three installation files of roseha to/data/install to facilitate installation of the two hosts.

Before installing Rose HA, modify the hosts file and enter the corresponding host name and IP address. The modification method is the same as that of the Windows Hosts file, we can enter the host name.

Modification method:

[[Email protected] # vi/etc/hosts

Add. Shape:

  1. Ota-db1
  2. Ota-db2
  • Hardware Installation

Connect the COM ports of Server 1 and Server 2 with the RS232 serial port of Rose software.

Note: We recommend that you use two heartbeat wires. To establish a second heartbeat wire through the network card, use the following method to connect:

Use a network cable to directly connect the NICS on the two servers as the heartbeat line.

Use a vswitch to connect the NICS on the two servers as the external network cables.

  • Software Installation

Install Rose ha for Linux

Mount the disk array to the first host

[[Email protected] # cd/data/install

[[Email protected] install] #./install. Sh

1.1.2 set environment variables and manage accounts

Modify the. bash_profile file under root and add the environment variable:

[[Email protected] vi $ home/. bash_profile

  • Add/opt/roseha/bin after path
  • Add

Export hahome =/opt/roseha

  • Set the management account:

# Cd/opt/roseha/bin

#./Newpass

Enter the user name and password to log on to the Rose HA console and manage the HA.

To modify the created management user, use the setpass command in the/opt/roseha/bin directory. This command can be used to modify the created user name and password.

Run the core process of roseha background

A) There are two core processes in the background of roseha: one is the monitoring process: hamond, and the other is the service process: hasvrd. When the system starts up, the two core processes of roseha will be automatically started, and the automatic start is completed through the/etc/rc3.d/s999roseha file. After the software package is installed, the two processes of roseha will not be started automatically. You can run the following command to start them:

# Cd/opt/roseha/bin

#./Hamond

Hamond automatically starts hasvrd. In this case, run the following command:

# Ps-Ef | grep ha

We can see that both hamond and hasvrd are running.

The two core processes of roseha are designed to monitor each other. If any process finds that another process is absent, it immediately restarts the other process to ensure that it is running at any time.

1.1.3 configure Rose HA heartbeat Network

Log on to the Administrator tools console:

  • Management Interface startup

CTRL + ALT + F6 switch to character state

[[Email protected] 1] # hacon

  • Connection

Go to tools --- connect and enter server: 127.0.0.1.

User: Root

Password: Root

  • License number input:

Enter tools --- license, enter hostname: the local host name on the left, and the remote host name on the right. (After entering the left-side host name, press the tab key to move the cursor to the right, enter the remote host name, and click OK)

  • Create an RS232 private network:

Go to privatenet --- create RS232 and change the devicename of the two hosts to/dev/ttys0.

Note: This operation is required on both hosts.

  • Create a socket Private Network

Go to privatenet --- create socket, select the address used by the host for private network, and enter the address used by the remote host for private network. Note: This is the IP address used for communication between two machines (Heartbeat IP ),

Note: This operation is required on both hosts.

  • Obtain the host information of the recipient:

Go to tools --- network and select autoget and OK. In this way, the host information of the other party is obtained.

1.1.4 configure the HA Oracle service

Go to services --- create,

Type: Oracle (select oracle in the Service and three scripts will be automatically loaded)

IP holding NIC: select the names of the NIC devices (for example, eth0) that provide external services for the two hosts ),

Cannot be on the same device as the heartbeat Nic.

Active IP Address: This is the IP address (virtual IP address) for external database services. This address is required

It must be in the same network segment as the actual IP address of the public network (that is, it must be in the same network segment as the actual IP address of the NIC selected in the IP holding Nic ).

Active subnetmask: Subnet Mask of the virtual IP address.

Agent Script: The corresponding monitoring script, such as ha_ag_oracle.x.

Start Script: The corresponding STARTUP script, such as ora_start.sh.

Stop Script: A stop script, for example, ora_stop.sh.

Active volume: The device name of the file system shared by two hosts on the disk array. For example:/dev/CCISS/c1d0p1

Backup volume: The device name of the file system shared by two hosts on the disk array. The value of active volume should be the same as that of backup volume.

Mount point: the mount point corresponding to the active volume and backup volume values. For example,/Data

Switchback: No

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.