码迷,mamicode.com
首页 > 其他好文 > 详细

GlusterFS学习之路(二)GlusterFS部署

时间:2018-08-07 18:53:33      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:添加   scp   修改主机名   lld   配置   str   tab   install   body   

  • 一、环境说明

主机名 IP地址 角色
gluster-node1 192.168.56.11 Server、Client
gluster-node2 192.168.56.12 Server、Client
gluster-node3 192.168.56.13 Server、Client
  • 二、GlusterFS安装

(1)修改主机名

[root@localhost ~]# hostnamectl set-hostname gluster-node1
[root@localhost ~]# bash
[root@localhost ~]# hostnamectl set-hostname gluster-node2
[root@localhost ~]# bash
[root@localhost ~]# hostnamectl set-hostname gluster-node3
[root@localhost ~]# bash

(2)添加host解析,实现集群主机之间相互解析

[root@gluster-node1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.11 gluster-node1
192.168.56.12 gluster-node2
192.168.56.13 gluster-node3
[root@gluster-node1 ~]# scp /etc/hosts root@gluster-node2:/etc/hosts
[root@gluster-node1 ~]# scp /etc/hosts root@gluster-node3:/etc/hosts

(3)关闭SElinux和防火墙

[root@gluster-node1 ~]# setenforce 0
[root@gluster-node1 ~]# sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/sysconfig/selinux
[root@gluster-node2 ~]# setenforce 0
[root@gluster-node2 ~]# sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/sysconfig/selinux
[root@gluster-node3 ~]# setenforce 0
[root@gluster-node3 ~]# sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/sysconfig/selinux
[root@gluster-node1 ~]# systemctl stop firewalld.service
[root@gluster-node1 ~]# systemctl disable firewalld.service
[root@gluster-node2 ~]# systemctl stop firewalld.service
[root@gluster-node2 ~]# systemctl disable firewalld.service
[root@gluster-node3 ~]# systemctl stop firewalld.service
[root@gluster-node3 ~]# systemctl disable firewalld.service

(4)安装epel源

[root@gluster-node1 ~]# yum install -y epel-release
[root@gluster-node2 ~]# yum install -y epel-release
[root@gluster-node3 ~]# yum install -y epel-release

(5)安装glusterfs源

[root@gluster-node1 ~]#  yum install -y centos-release-gluster
[root@gluster-node2 ~]#  yum install -y centos-release-gluster
[root@gluster-node3 ~]#  yum install -y centos-release-gluster

(6)安装glusterfs

[root@gluster-node1 ~]# yum install glusterfs-server -y
[root@gluster-node2 ~]# yum install glusterfs-server -y
[root@gluster-node3 ~]# yum install glusterfs-server -y
  • 三、GlusterFS配置

 

GlusterFS学习之路(二)GlusterFS部署

标签:添加   scp   修改主机名   lld   配置   str   tab   install   body   

原文地址:https://www.cnblogs.com/linuxk/p/9438480.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!