iii
目录
前言 ix
1. 文档约定 ...................................................................... ix
1.1. 排版约定 ............................................................... ix
1.2. 抬升式引用约定 .......................................................... x
1.3. 备注及警告 ............................................................. xi
2. We Need Feedback! ............................................................ xi
1. Read-Me-First 1
1.1. 本文范围 ..................................................................... 1
1.2. What Is Pacemaker? ......................................................... 1
1.3. Pacemaker 架构 ............................................................... 2
1.3.1. 内部组件 .............................................................. 3
1.4. Pacemaker 集群的种类 ......................................................... 5
2. 安装 7
2.1. Install CentOS 7.1 .......................................................... 7
2.1.1. Boot the Install Image ............................................... 7
2.1.2. Installation Options .................................................. 8
2.1.3. Configure Network ..................................................... 9
2.1.4. Configure Disk ....................................................... 10
2.1.5. Configure Time Synchronization ....................................... 10
2.1.6. Finish Install ....................................................... 10
2.2. Configure the OS ........................................................... 11
2.2.1. Verify Networking .................................................... 11
2.2.2. Login Remotely ....................................................... 12
2.2.3. Apply Updates ........................................................ 12
2.2.4. Use Short Node Names ................................................ 12
2.3. Repeat for Second Node ..................................................... 13
2.4. Configure Communication Between Nodes ...................................... 13
2.4.1. Configure Host Name Resolution ....................................... 13
2.4.2. 配置SSH .............................................................. 14
2.5. 安装集群软件 ................................................................ 15
2.6. Configure the Cluster Software ............................................. 15
2.6.1. Allow cluster services through firewall .............................. 15
2.6.2. Enable pcs Daemon .................................................... 16
2.6.3. Configure Corosync ................................................... 17
3. Pacemaker Tools 19
3.1. Simplify administration using a cluster shell .............................. 19
3.2. Explore pcs ................................................................. 19
4. Start and Verify Cluster 23
4.1. Start the Cluster .......................................................... 23
4.2. 检验Corosync的安装 .......................................................... 23
4.3. 检查Pacemaker的安装 ......................................................... 24
5. Create an Active/Passive Cluster 27
5.1. Explore the Existing Configuration ......................................... 27
5.2. Add a Resource ............................................................. 29
5.3. 做一次故障迁移 .............................................................. 30
5.4. 防止资源在节点恢复后迁移 .................................................... 33
6. Add Apache as a Cluster Service 35
6.1. Install Apache .............................................................. 35