centos6.5 rpm安装glusterfs以及第三方测试工具

这篇文章适合初学者读,做下实验来之后对glusterfs有一个初步的了解,我的所有操作都是在一台机器上做的。还有一些环境配置我列举了一下,并没有很详细的列出来,相信大家应该没问题。一些第三方测试工具需要大家自行在网上下载。楼主也是一个一个下载下来的.此次下载的是3.47的版本,因为我们公司用的就是这个版本,之前试过其它版本,老是会出现服务挂起的现象,没有办法,版本回退

glusterfs  rpm包下载地址:

https://download.gluster.org/pub/gluster/glusterfs/3.4/3.4.7/CentOS/epel-6.5/x86_64/

给大家这篇文章的一个概览,如下

环境配置

1. rpm包安装glusterfs以及第三方工具

1:配置本地yum源

1)创建存放rpm包的目录

2)将下载的包上传到对应的服务器目录中

3)安装createrepo工具并创建repo

4) 编辑.repo文件

5) 查看配置情况

6)网络yum源配置(了解)

2:yum安装glusterfs

1)安装

2)启动

3:yum安装第三方工具

1)安装atop fio iozone iperf sysstat

2)安装postmark

4:创建一个volume玩玩

1)创建一个testvol

2)查看testvol启动前信息

3)查看testvol启动后信息

4)挂载testvol并查看挂载情况

5) 测试挂载能否正常使用

6)卸载rpm安装的glusterfs

环境配置

初始环境配置就不再赘述,相信大家都已经很熟练了吧

1:修改主机名

2:关闭selinux

3:设置时间同步

4:设置hosts文件

1.rpm包安装glusterfs以及第三方工具

1:配置本地yum源

1)创建存放rpm包的目录

[[email protected] ~]# mkdir -p /soft/glusterf{s,stools}

2)将下载的包上传到对应的服务器目录中

[[email protected] glusterfs]# pwd

/soft/glusterfs

[[email protected] glusterfs]# ls

glusterfs-3.4.7-1.el6.x86_64.rpm

glusterfs-api-3.4.7-1.el6.x86_64.rpm

glusterfs-api-devel-3.4.7-1.el6.x86_64.rpm

glusterfs-cli-3.4.7-1.el6.x86_64.rpm

glusterfs-debuginfo-3.4.7-1.el6.x86_64.rpm

glusterfs-devel-3.4.7-1.el6.x86_64.rpm

glusterfs-fuse-3.4.7-1.el6.x86_64.rpm

glusterfs-geo-replication-3.4.7-1.el6.x86_64.rpm

glusterfs-libs-3.4.7-1.el6.x86_64.rpm

glusterfs-rdma-3.4.7-1.el6.x86_64.rpm

glusterfs-server-3.4.7-1.el6.x86_64.rpm

[[email protected] glusterfstools]# pwd

/soft/glusterfstools

[[email protected] glusterfstools]# ls

atop-1.27-3.x86_64.rpm            iperf-2.0.4-1.el6.rf.x86_64.rpm

fio-2.1.7-1.el6.rf.x86_64.rpm     postmark_1.51.orig.tar.gz

iozone-3.394-1.el6.rf.x86_64.rpm

3)安装createrepo工具并创建repo

[[email protected] glusterfstools]# yum -y install createrepo

[[email protected] ~]# createrepo /soft/glusterfs

Spawning worker 0 with 11 pkgs

Workers Finished

Gathering worker results

Saving Primary metadata

Saving file lists metadata

Saving other metadata

Generating sqlite DBs

Sqlite DBs complete

[[email protected] ~]# createrepo /soft/glusterfstools/

Spawning worker 0 with 4 pkgs

Workers Finished

Gathering worker results

Saving Primary metadata

Saving file lists metadata

Saving other metadata

Generating sqlite DBs

Sqlite DBs complete

4)编辑.repo文件

[[email protected] ~]# vim /etc/yum.repos.d/glusterfs.repo

[glusterfs]

name=glusterfs rpm

baseurl=file:///soft/glusterfs/

enabled=1

gpgcheck=0

[[email protected] ~]# vim /etc/yum.repos.d/glusterfstools.repo

[glusterfstools]

name=glusterfs test tools

baseurl=file:///soft/glusterfstools/

enabled=1

gpgcheck=0

5)查看配置情况

[[email protected] yum.repos.d]# yum clean all

Loaded plugins: fastestmirror, refresh-packagekit, security

Cleaning repos: base extras glusterfs glusterfstools updates

Cleaning up Everything

Cleaning up list of fastest mirrors

[[email protected] yum.repos.d]# yum repolist

Loaded plugins: fastestmirror, refresh-packagekit, security

Determining fastest mirrors

* base: mirrors.btte.net

* extras: mirrors.btte.net

* updates: mirrors.tuna.tsinghua.edu.cn

base                                                     | 3.7 kB     00:00

base/primary_db                                          | 4.7 MB     00:00

extras                                                   | 3.4 kB     00:00

extras/primary_db                                        |  37 kB     00:00

glusterfs                                                | 2.9 kB     00:00 ...

glusterfs/primary_db                                     | 8.6 kB     00:00 ...

glusterfstools                                           | 2.9 kB     00:00 ...

glusterfstools/primary_db                                | 5.4 kB     00:00 ...

updates                                                  | 3.4 kB     00:00

updates/primary_db                                       | 3.7 MB     00:00

repo id                           repo name                               status

base                              CentOS-6 - Base                         6,696

extras                            CentOS-6 - Extras                          62

glusterfs                         glusterfs rpm                              11

glusterfstools                    glusterfs test tools                        4

updates                           CentOS-6 - Updates                        686

repolist: 7,459

6)网络yum源配置(了解)

[[email protected] ~]# cat /etc/yum.repos.d/gluster.repo

[glusterfs]

name=glusterfs

baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.4/3.4.7/CentOS/epel-6.5/x86_64/

enabled=1

gpgcheck=0

[[email protected] ~]# yum clean all

[[email protected] ~]# yum repolist

repo id                            repo name                                    status

base                               CentOS-6 - Base                              6,696

extras                             CentOS-6 - Extras                               62

glusterfs                          glusterfs                                       11

updates                            CentOS-6 - Updates                             686

repolist: 7,455

2:yum安装glusterfs

1)安装

[[email protected] glusterfs]# pwd

/soft/glusterfs

[[email protected] glusterfs]# yum -y install glusterfs-*

Loaded plugins: fastestmirror, refresh-packagekit, security

Bad id for repo: [email protected] ~, byte = @ 4

Loading mirror speeds from cached hostfile

* base: mirrors.btte.net

* extras: mirrors.tuna.tsinghua.edu.cn

* updates: mirrors.tuna.tsinghua.edu.cn

Setting up Install Process

Examining glusterfs-3.4.7-1.el6.x86_64.rpm: glusterfs-3.4.7-1.el6.x86_64

Marking glusterfs-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-api-3.4.7-1.el6.x86_64.rpm: glusterfs-api-3.4.7-1.el6.x86_64

Marking glusterfs-api-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-api-devel-3.4.7-1.el6.x86_64.rpm: glusterfs-api-devel-3.4.7-1.el6.x86_64

Marking glusterfs-api-devel-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-cli-3.4.7-1.el6.x86_64.rpm: glusterfs-cli-3.4.7-1.el6.x86_64

Marking glusterfs-cli-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-debuginfo-3.4.7-1.el6.x86_64.rpm: glusterfs-debuginfo-3.4.7-1.el6.x86_64

Marking glusterfs-debuginfo-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-devel-3.4.7-1.el6.x86_64.rpm: glusterfs-devel-3.4.7-1.el6.x86_64

Marking glusterfs-devel-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-fuse-3.4.7-1.el6.x86_64.rpm: glusterfs-fuse-3.4.7-1.el6.x86_64

Marking glusterfs-fuse-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-geo-replication-3.4.7-1.el6.x86_64.rpm: glusterfs-geo-replication-3.4.7-1.el6.x86_64

Marking glusterfs-geo-replication-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-libs-3.4.7-1.el6.x86_64.rpm: glusterfs-libs-3.4.7-1.el6.x86_64

Marking glusterfs-libs-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-rdma-3.4.7-1.el6.x86_64.rpm: glusterfs-rdma-3.4.7-1.el6.x86_64

Marking glusterfs-rdma-3.4.7-1.el6.x86_64.rpm to be installed

Examining glusterfs-server-3.4.7-1.el6.x86_64.rpm: glusterfs-server-3.4.7-1.el6.x86_64

Marking glusterfs-server-3.4.7-1.el6.x86_64.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package glusterfs.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-api.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-api-devel.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-cli.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-debuginfo.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-devel.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-fuse.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-geo-replication.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-libs.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-rdma.x86_64 0:3.4.7-1.el6 will be installed

---> Package glusterfs-server.x86_64 0:3.4.7-1.el6 will be installed

--> Processing Dependency: xfsprogs for package: glusterfs-server-3.4.7-1.el6.x86_64

--> Running transaction check

---> Package xfsprogs.x86_64 0:3.1.1-19.el6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================

Package         Arch   Version     Repository                               Size

==================================================================================

Installing:

glusterfs       x86_64 3.4.7-1.el6 /glusterfs-3.4.7-1.el6.x86_64           3.6 M

glusterfs-api   x86_64 3.4.7-1.el6 /glusterfs-api-3.4.7-1.el6.x86_64       126 k

glusterfs-api-devel

x86_64 3.4.7-1.el6 /glusterfs-api-devel-3.4.7-1.el6.x86_64  20 k

glusterfs-cli   x86_64 3.4.7-1.el6 /glusterfs-cli-3.4.7-1.el6.x86_64       245 k

glusterfs-debuginfo

x86_64 3.4.7-1.el6 /glusterfs-debuginfo-3.4.7-1.el6.x86_64  27 M

glusterfs-devel x86_64 3.4.7-1.el6 /glusterfs-devel-3.4.7-1.el6.x86_64     450 k

glusterfs-fuse  x86_64 3.4.7-1.el6 /glusterfs-fuse-3.4.7-1.el6.x86_64      205 k

glusterfs-geo-replication

x86_64 3.4.7-1.el6 /glusterfs-geo-replication-3.4.7-1.el6.x86_64

472 k

glusterfs-libs  x86_64 3.4.7-1.el6 /glusterfs-libs-3.4.7-1.el6.x86_64      669 k

glusterfs-rdma  x86_64 3.4.7-1.el6 /glusterfs-rdma-3.4.7-1.el6.x86_64       81 k

glusterfs-server

x86_64 3.4.7-1.el6 /glusterfs-server-3.4.7-1.el6.x86_64    1.5 M

Installing for dependencies:

xfsprogs        x86_64 3.1.1-19.el6

base                                    725 k

Transaction Summary

==================================================================================

Install      12 Package(s)

Total size: 35 M

Total download size: 725 k

Installed size: 37 M

Downloading Packages:

xfsprogs-3.1.1-19.el6.x86_64.rpm                           | 725 kB     00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : glusterfs-libs-3.4.7-1.el6.x86_64                             1/12

Installing : glusterfs-3.4.7-1.el6.x86_64                                  2/12

Installing : glusterfs-fuse-3.4.7-1.el6.x86_64                             3/12

Installing : glusterfs-devel-3.4.7-1.el6.x86_64                            4/12

Installing : glusterfs-api-3.4.7-1.el6.x86_64                              5/12

Installing : glusterfs-cli-3.4.7-1.el6.x86_64                              6/12

Installing : xfsprogs-3.1.1-19.el6.x86_64                                  7/12

Installing : glusterfs-server-3.4.7-1.el6.x86_64                           8/12

Installing : glusterfs-geo-replication-3.4.7-1.el6.x86_64                  9/12

Installing : glusterfs-api-devel-3.4.7-1.el6.x86_64                       10/12

Installing : glusterfs-rdma-3.4.7-1.el6.x86_64                            11/12

Installing : glusterfs-debuginfo-3.4.7-1.el6.x86_64                       12/12

Verifying  : glusterfs-fuse-3.4.7-1.el6.x86_64                             1/12

Verifying  : glusterfs-3.4.7-1.el6.x86_64                                  2/12

Verifying  : glusterfs-server-3.4.7-1.el6.x86_64                           3/12

Verifying  : glusterfs-libs-3.4.7-1.el6.x86_64                             4/12

Verifying  : glusterfs-devel-3.4.7-1.el6.x86_64                            5/12

Verifying  : glusterfs-rdma-3.4.7-1.el6.x86_64                             6/12

Verifying  : glusterfs-geo-replication-3.4.7-1.el6.x86_64                  7/12

Verifying  : glusterfs-debuginfo-3.4.7-1.el6.x86_64                        8/12

Verifying  : glusterfs-api-devel-3.4.7-1.el6.x86_64                        9/12

Verifying  : glusterfs-api-3.4.7-1.el6.x86_64                             10/12

Verifying  : xfsprogs-3.1.1-19.el6.x86_64                                 11/12

Verifying  : glusterfs-cli-3.4.7-1.el6.x86_64                             12/12

Installed:

glusterfs.x86_64 0:3.4.7-1.el6

glusterfs-api.x86_64 0:3.4.7-1.el6

glusterfs-api-devel.x86_64 0:3.4.7-1.el6

glusterfs-cli.x86_64 0:3.4.7-1.el6

glusterfs-debuginfo.x86_64 0:3.4.7-1.el6

glusterfs-devel.x86_64 0:3.4.7-1.el6

glusterfs-fuse.x86_64 0:3.4.7-1.el6

glusterfs-geo-replication.x86_64 0:3.4.7-1.el6

glusterfs-libs.x86_64 0:3.4.7-1.el6

glusterfs-rdma.x86_64 0:3.4.7-1.el6

glusterfs-server.x86_64 0:3.4.7-1.el6

Dependency Installed:

xfsprogs.x86_64 0:3.1.1-19.el6

Complete!

2)启动

[[email protected] glusterfs]# service glusterd start

Starting glusterd:                                         [确定]

3:yum安装第三方工具

1)安装atop fio iozone iperf sysstat

[[email protected] glusterfs]# yum -y install atop fio iozone iperf sysstat

2)安装postmark

postmark在网上找不到rpm包,下载了个c文件

[[email protected] glusterfstools]# pwd

/soft/glusterfstools

[[email protected] glusterfstools]# tar -zxf postmark_1.51.orig.tar.gz

[[email protected] glusterfstools]# cd postmark-1.51/

[[email protected] postmark-1.51]# ls

postmark-1.51.c

[[email protected] postmark-1.51]# gcc postmark-1.51.c -o /usr/bin/postmark

/tmp/ccU1fr6U.o: In function `cli_show‘:

postmark-1.51.c:(.text+0x26f9): warning: the `getwd‘ function is dangerous and should not be used.

4:创建一个volume玩玩

这个测试是找一台单机服务器作为测试,所有的操作都是在这台服务器上进行

1)创建一个testvol

[[email protected] postmark-1.51]# gluster volume create testvol 192.168.11.139:/data/brick5 force

volume create: testvol: success: please start the volume to access data

2)查看testvol启动前信息

[[email protected] postmark-1.51]# gluster volume status

Volume testvol is not started

[[email protected] postmark-1.51]# gluster volume info

Volume Name: testvol

Type: Distribute

Volume ID: dd9da9ff-026e-4c1a-a0a1-720a7df2b7f3

Status: Created

Number of Bricks: 1

Transport-type: tcp

Bricks:

Brick1: 192.168.11.139:/data/brick5

3)查看testvol启动后信息

[[email protected] postmark-1.51]# gluster volume start testvol

volume start: testvol: success

[[email protected] postmark-1.51]# gluster volume info

Volume Name: testvol

Type: Distribute

Volume ID: dd9da9ff-026e-4c1a-a0a1-720a7df2b7f3

Status: Started

Number of Bricks: 1

Transport-type: tcp

Bricks:

Brick1: 192.168.11.139:/data/brick5

4)挂载testvol并查看挂载情况

[[email protected] postmark-1.51]# mount -t glusterfs 192.168.11.139:/testvol /mnt

[[email protected] postmark-1.51]# df -h

Filesystem                    Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root   18G  3.8G   14G  23% /

tmpfs                         364M  228K  364M   1% /dev/shm

/dev/sda1                     485M   35M  426M   8% /boot

192.168.11.139:/testvol        18G  3.8G   14G  23% /mnt

5)测试挂载能否正常使用

[[email protected] postmark-1.51]# cd /mnt/

[[email protected] mnt]# ls

[[email protected] mnt]# touch a

[[email protected] mnt]# vim a

[[email protected] mnt]# cat a

this is a demo

hello world

[[email protected] mnt]# df -h

Filesystem                    Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root   18G  3.8G   14G  23% /

tmpfs                         364M  228K  364M   1% /dev/shm

/dev/sda1                     485M   35M  426M   8% /boot

192.168.11.139:/testvol        18G  3.8G   14G  23% /mnt

[[email protected] mnt]#  cd /data/brick5/

[[email protected] brick5]# ls

a

[[email protected] brick5]# cat a

this is a demo

hello world

6)卸载rpm安装的glusterfs

[[email protected] brick5]# service glusterd stop

[[email protected] brick5]# rpm -qa | grep glusterfs      [确定]

glusterfs-api-3.4.7-1.el6.x86_64

glusterfs-geo-replication-3.4.7-1.el6.x86_64

glusterfs-3.4.7-1.el6.x86_64

glusterfs-fuse-3.4.7-1.el6.x86_64

glusterfs-debuginfo-3.4.7-1.el6.x86_64

glusterfs-devel-3.4.7-1.el6.x86_64

glusterfs-server-3.4.7-1.el6.x86_64

glusterfs-rdma-3.4.7-1.el6.x86_64

glusterfs-libs-3.4.7-1.el6.x86_64

glusterfs-cli-3.4.7-1.el6.x86_64

glusterfs-api-devel-3.4.7-1.el6.x86_64

[[email protected] brick5]# rpm -qa | grep glusterfs | xargs rpm -e

[[email protected] brick5]# rpm -qa |grep glusterfs

时间: 2024-10-29 19:09:53

centos6.5 rpm安装glusterfs以及第三方测试工具的相关文章

centos6.5 rpm安装mysql5.6.19

1,检查MySQL及相关RPM包,是否安装,如果有安装,则移除. rpm -qa | grep -i mysql yum -y remove mysql-libs* 2,根据系统下载RPM包,我下载的MySQL-5.6.19-1.el6.i686.rpm-bundle.tar 解压压缩包,依次安装: rpm -ivh MySQL-server-5.6.19-1.el6.i686.rpm rpm -ivh MySQL-devel-5.6.19-1.el6.i686.rpm rpm -ivh MyS

centos6.5 rpm安装mysql5.6.19操作及步骤

系统:centos 6.5  64位 数据库:mysql5.6.19 64位 采用RPM安装包安装,之后修改mysql默认路径. 首先要卸载系统自带mysql包,命令如下 yum remove mysql mysql-server mysql-libs 检查是否有残留 rpm -qa | grep mysql 若发现有则使用rpm -e 安装包名称 安装步骤: 1.官网下载tar压缩包,下载地址为http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-5.6

Centos6下rpm安装MySQL5.6

Centos6在rpm安装 rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm yum install mysql-server –y 启动 service mysqld start 初始化 mysql_secure_installation Enter current password for root (enter for none): Set root password? [Y/n] Remo

CentOS6脱机rpm安装MariaDB10

转载请保存原文链接:http://www.wlm.so/Article/Detail/lmb4cijci5mc900000 1.卸载原有mysql安装包,避免安装文件冲突 #查找所有的mysql包 rpm -qa|grep -i mysql #卸载包,XXXXXXX换成查找出来的mysql包 rpm -e --nodeps XXXXXXX 2.下载安装包,解压后,上传到CentOS6系统中,放在root目录下. http://pan.baidu.com/s/1jGIca7G 3.输入以下命令完成

Linux centos6.6 rpm安装与管理

rpm包管理:安装.升级.卸载.查询.检验 安装: rpm {-i|--install} [install-options] PACKAGE_FILE1... -h: hash,以#来表示安装进度: -v, --verbose:显示安装过程中的详细信息: 安装时常用的组合: -ivh --test:不执行真正的安装过程,而仅报告依赖关系及冲突信息等: 程序包之间存在依赖关系: 我们要安装程序包A,程序包A必需依赖程序包B,才能运行.这就是依赖关系. 依赖可能是多层次的,A 依赖 B ,B 依赖

Linux CentOS6 mysql rpm安装

mysql rpm文件下载地址:https://dev.mysql.com/downloads/mysql/ 选择操作系统及版本: 点击5.6版本链接 将下载好的文件上传至服务器 下面开始安装: 检查是是否有mysql的包 # rpm -qa | grep -i mysql 删除原有包 # yum -y remove mysql-libs* 开始安装下载好的三个文件: # rpm -ivh MySQL-server-5.6.38-1.el6.x86_64.rpm # rpm -ivh MySQL

centos 6.6 下ython 的编译安装和python 编写测试工具Ipython 的编译安装

㈠ Python 和ipython 的依赖包 #yum install -y readline-devel -y #yum groupinstall "development tools" -y ㈡ 安装 Python 2.7 # wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz          # tar -zxvf Python-2.7.10.tgz        # cd Python-2.7.10 

日记(2014-07-09) centos6.5 rpm方式安装gcc

由于实验室rpm包都被过滤掉,导致centos里面的yum无法下载安装软件.使用make编译各种软件源码发现没有gcc,g++.只好采用离线方式进行安装.话说yum无法下载rpm包,在下面的地址居然可以下载rpm压缩包.我这菜鸟没弄明白为什么. 在网上搜索资料安装成功,gcc和g++的rpm包下载地址http://fr2.rpmfind.net/linux/rpm2html/search.php?query=gcc-c%2B%2B&submit=Search+...&system=&

Linux 下DHCP服务器rpm安装配置及其测试

一.了解DHCP DHCP服务提供动态指定IP地址和配置参数的机制.有动态和静态两种方式. 二.rpm安装 因为配过Samba,所以感觉挺简单. 首先找到主程序和几个附属程序的rpm的安装包.应该都是在media的DVD的Server包里的.用find找到文件位置然后rpm -ivh安装就可以了.[好像不能直接命令进入DVD...于是选择窗口进入...]安装完之后,rpm -qa|grep dhcp可以查看是否安装成功. 三.配置 主配置文件是/etc目录下的dhcpd.conf文件,但是这个文