运维企业实战——mfs配置高可用

实验环境:
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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值