GlusterFS学习之路GlusterFS部署
Posted linuxk
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GlusterFS学习之路GlusterFS部署相关的知识,希望对你有一定的参考价值。
-
一、环境说明
主机名 | 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)修改主机名
[[email protected] ~]# hostnamectl set-hostname gluster-node1 [[email protected] ~]# bash [[email protected] ~]# hostnamectl set-hostname gluster-node2 [[email protected] ~]# bash [[email protected] ~]# hostnamectl set-hostname gluster-node3 [[email protected] ~]# bash
(2)添加host解析,实现集群主机之间相互解析
[[email protected] ~]# 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 [[email protected]-node1 ~]# scp /etc/hosts [email protected]:/etc/hosts [[email protected]-node1 ~]# scp /etc/hosts [email protected]:/etc/hosts
(3)关闭SElinux和防火墙
[[email protected] ~]# setenforce 0 [[email protected]-node1 ~]# sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g‘ /etc/sysconfig/selinux [[email protected]-node2 ~]# setenforce 0 [[email protected]-node2 ~]# sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g‘ /etc/sysconfig/selinux [[email protected]-node3 ~]# setenforce 0 [[email protected]-node3 ~]# sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g‘ /etc/sysconfig/selinux [[email protected]-node1 ~]# systemctl stop firewalld.service [[email protected]-node1 ~]# systemctl disable firewalld.service [[email protected]-node2 ~]# systemctl stop firewalld.service [[email protected]-node2 ~]# systemctl disable firewalld.service [[email protected]-node3 ~]# systemctl stop firewalld.service [[email protected]-node3 ~]# systemctl disable firewalld.service
(4)安装epel源
[[email protected] ~]# yum install -y epel-release [[email protected]-node2 ~]# yum install -y epel-release [[email protected]-node3 ~]# yum install -y epel-release
(5)安装glusterfs源
[[email protected] ~]# yum install -y centos-release-gluster [[email protected]-node2 ~]# yum install -y centos-release-gluster [[email protected]-node3 ~]# yum install -y centos-release-gluster
(6)安装glusterfs
[[email protected] ~]# yum install glusterfs-server -y [[email protected]-node2 ~]# yum install glusterfs-server -y [[email protected]-node3 ~]# yum install glusterfs-server -y
-
三、GlusterFS配置
以上是关于GlusterFS学习之路GlusterFS部署的主要内容,如果未能解决你的问题,请参考以下文章