HeartBeat V2 Configuration LAMP HA Description and HB_GUI Tool Instructions

Regarding the heartbeat v2 version description, using the hb_gui window management tool, there will be a separate process mgmtd to test crm, which is responsible for crm work and monitors the tcp protocol on port 5560.
Title: Realize the combination of LAMP HA, It is required that wordpress is deployed, and any data in the article used for editing can work normally after the node is switched. (Two HA, One NFS)
1) Still using the previous HeartBeat V1 configuration, only needs to change ha.cf

vim /etc/ha.d/ha.cf

Add a line

crm respawn

2) Install the gui package

rpm-ivh heartbeat-gui-2.1.4-12.el6.x86_64.rpm

pre>


    
    3) 为登陆gui控制台添加用户名的密码,用户名已经/etc/passwd
      

echo sss |passwd --stdin hacluster

4) Operate on another NFS server
Share two directories for storing databases and wordpress documents respectively
/p>

vim/exports/data 172.16.0.0/16(rw,no_root_squash)/html_data 172.16.0.0/16(rw,no_root_squash)

Create two system users mysql and apache

groupadd -r -g 306 mysqluseradd -u 306 -g 306 mysql

< p> 5) Install the database mariadb on node1

mkdir/datamount -t nfs 172.16.49.103: /data/datamkdir/data/mydata

Install the database, and put the database file in /data/mydata, prompting, there is a script for installing mariadb in front, no explanation
Create database

MariaDB[(none)]> CREATE DATABASE wordpress;MariaDB[(none)]> GRANT ALL ON wordpress.* TO'wpadmin'@'172.16. %.%' ​​IDENTIFIED BY'wpadmin'; MariaDB [(none)]> FLUSH PRIVILEGES;

6) Close the database mariadb on node1
Unmount the mounted directory umount /data< br> On node2

mkdir/datamount -t nfs 172.16.49.103:/data/data

Install the database But you don’t need to initialize the database
Test whether the database is working properly

7) Install php and php-mysql

yuminstall PHP php-mysql -y  


8) Test if PHP can be connected to the database mount-t nfs 172.16.49.103:/html_data/var/www/html

9) Install wordpress in the html_data directory of nfs

mv wp-config-sample.php wp-conf Ig.phpvim wp-config.php  


wKiom1Vum1vglqGsAALBnAK3Mwc270.jpg

Figure 1: Define resources by growing

p>

wKioL1VunWHDZzhyAAJXnFiodOM747.jpg

Figure 2: Uploaded mysql command file

wKioL1Vuna3x6e0IAAOELUsTQGk555.jpg

Figure 3: Use colocation and order to constrain, instead of using groups

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2577 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.