标签:添加 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 |
(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
标签:添加 scp 修改主机名 lld 配置 str tab install body
原文地址:https://www.cnblogs.com/linuxk/p/9438480.html