1. Since the development environment is temporarily unable to access the Internet, you need to prepare the RPM installation package yourself. You can use the following command to download the installation package required by glusterfs on the local virtual machine:
1) Install the yum download plugin yum install --downloadonly --downloaddir=/home/admin/glusterfs glusterfs-server
2) rpm –ivh epel-release-6-8.noarch
3) Add resources
wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/CentOS/glusterfs-epel.repo
4) Download the installation package:
yum install --downloadonly --downloaddir=/home/admin/glusterfs glusterfs-server
2. Install glusterfs
rpm –ivh *
3. Start glusterfs
service glusterd start
chkconfig glusterd on
4. Configure the entire GlusterFS cluster
[root@glusterfs1 ~]# gluster peer probe glusterfs1
peer probe: success. Probe on localhost not needed
[root@glusterfs1 ~]#
[root@glusterfs1 ~]# gluster peer probe glusterfs2
peer probe: success.
[root@glusterfs1 ~]#
5. View node status
gluster peer status
6. Create a storage directory
[root@glusterfs1 share]# mkdir -p /usr/local/share/models
7. Create a glusterfs disk
[root@glusterfs1 share]# gluster volume create models replica 2 glusterfs1:/usr/local/share/models glusterfs2:/usr/local/share/models force
volume create: models: success: please start the volume to access data
[root@glusterfs1 share]#
8. Start the data volume
[root@glusterfs1 share]# gluster volume start models
volume start: models: success
[root@glusterfs1 share]#
9. Client installation glusterfs
Rpm –ivh *
10. Create a mount point
[root@master3 ~]#mkdir -p /mnt/models
11. Mount glusterfs
[root@master3 ~]# mount -t glusterfs -o rw glusterfs1:models /mnt/models/
mount -t glusterfs -o rw CBHKZY-HP-03:models /mnt/portal/userfile
Note: /etc/hosts is configured; close the firewall Reference: http://www.datacoder.cn/distributestore/537