1.glusterfs7 repo源
- 添加此源到/etc/yum.repo.d/glusterfs.repo中
1
2
3
4
5
6
7
8
9[centos-gluster7]
gpgcheck = 0
mirrorlist = http://mirrorlist.centos.org?arch=$basearch&release=$releasever&repo=storage-gluster-7
name = CentOS-$releasever - Gluster 7
[centos-gluster6]
gpgcheck = 0
mirrorlist = http://mirrorlist.centos.org?arch=$basearch&release=$releasever&repo=storage-gluster-6
name = CentOS-$releasever - Gluster 62.更新系统yum 源
1
yum check-update
3.安装脚本(glusterfs_install.sh)
- 脚本内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27#!/bin/bash
version="$1"
[[ "$version" == "" ]] && echo "version not provided" && exit 1
rpm_packages=(
glusterfs-server
glusterfs-events
glusterfs-extra-xlators
glusterfs-geo-replication
glusterfs-libs
glusterfs-rdma
glusterfs
glusterfs-api
glusterfs-api-devel
glusterfs-cli
glusterfs-client-xlators
glusterfs-fuse
python2-gluster
)
for index in ${!rpm_packages[@]}; do
rpm_version_packages[$index]=${rpm_packages[$index]}"-"$version
done
yum install -y ${rpm_version_packages[*]} - 脚本执行
1
2// 7.2是版本号
./glusterfs_install.sh 7.2