实验环境:
redhat: 7.3
server1 172.25.10.1 mfsmaster管理节点
server2 172.25.10.2 从节点
server3 172.25.10.3 从节点
server4 172.25.10.4 高可用节点
真机 172.25.10.250 客户端
1、server4上安装master,编辑域名解析,开启服务
[root@server4 ~]# yum install moosefs-master-3.0.103-1.rhsystemd.x86_64.rpm -y
[root@server4 ~]# vim /etc/hosts
172.25.10.1 server1 mfsmaster
[root@server4 ~]# vim /usr/lib/systemd/system/moosefs-master.service
ExecStart=/usr/sbin/mfsmaster -a
[root@server4 ~]# systemctl daemon-reload
[root@server4 ~]# systemctl start moosefs-master
2、在server1和server4上配置高可用yum源
[root@server1 ~]# vim /etc/yum.repos.d/yum.repo
[rhel7]
name=rhel7.3
baseurl=http://172.25.10.250/rhel7.3
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=http://172.25.10.250/rhel7.3/addons/HighAvailability
gpgcheck=0
[ResilientStorage]
name=ResilientStorage
baseurl=http://172.25.10.250/rhel7.3//addons/ResilientStorage
gpgcheck=0
[root@server1 mnt]# scp /etc/yum.repos.d/yum.repo server4:/etc/yum.repos.d/yum.repo
3、在server1和server4上安装组件
[root@server1 mnt]# yum install -y pacemakeer corosync
[root@server4 ~]# yum install -y pacemakeer corosync
4、给server1和server4做免密
[root@server1 mnt]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
8a:e4:31:e5:7b:07:70:24:94:f1:bf:b5:74:7d:0c:8f root@server1
The key's randomart image is:
+--[ RSA 2048]----+
| .+o. |
| .+ |
| o o . |
| o o . * |
| + . S . o E =|
| o + o . + o .|
| o o . o . |
| . . |
| |
+-----------------+
[root@server1 mnt]# ssh-copy-id server4
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@server4's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'server4'"
and check to make sure that only the key(s) you wanted were added.
[root@server1 mnt]# ssh-copy-id server1
The authenticity of host 'server1 (172.25.10.1)' can't be established.
ECDSA key fingerprint is a1:32:13:3a:f7:04:db:99:66:54:5f:eb:3a:2c:a3:5e.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@server1's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'server1'"
and check to make sure that only the key(s) you wanted were added.
5、安装资源管理工具pcs
[r