您当前的位置:首页 > 网站建设 > 网站维护
| php | asp | css | H5 | javascript | Mysql | Dreamweaver | Delphi | 网站维护 | 帝国cms | React | 考试系统 | ajax | jQuery |

Centos7下yum安装Ceph分布式存储教程

51自学网 2022-07-04 11:29:00
  网站维护

前言

本文讲述了Ceph应该如何安装,掌握方法后,可自行选择安装哪个版本的Ceph。

配置yum源,epel源

首先机器需要联网,并且配置网络yum源,epel源,可从阿里开源镜像站中下载源文件。

注:EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL、CentOS和Scientific Linux.

网址:阿里云官方镜像站

例如:我所使用的是Centos7,接下来给对应版本的linux下载yum源,epel源。

在这里插入图片描述
在这里插入图片描述

配置yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

建立缓存

yum makecache 已加载插件:fastestmirror, langpacksDetermining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.combase                                                  | 3.6 kB     00:00     extras                                                | 2.9 kB     00:00     updates                                               | 2.9 kB     00:00     base/7/x86_64/primary_db       FAILED                                          http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/f09552edffa70f49f553e411c2282fbccfffbeafa21e81e32622b103038b8bae-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"正在尝试其它镜像。(1/10): base/7/x86_64/group_gz                          | 153 kB   00:00     (2/10): extras/7/x86_64/filelists_db                    | 205 kB   00:00     (3/10): extras/7/x86_64/other_db                        | 122 kB   00:00     (4/10): base/7/x86_64/other_db                          | 2.6 MB   00:00     (5/10): updates/7/x86_64/filelists_db                   | 1.3 MB   00:00     (6/10): updates/7/x86_64/other_db                       | 195 kB   00:00     (7/10): base/7/x86_64/primary_db                        | 6.1 MB   00:00     base/7/x86_64/filelists_db     FAILED                                          http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6882feea31727f25dc12063b4bab119501d25dbf6cb6fa0f5b78b8e3d5401ea4-filelists.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"正在尝试其它镜像。extras/7/x86_64/primary_db     FAILED                                          http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/42c5d8fe33ef3f1ab94d1ae257bc56201267d8af60132e3d778e586693e50a8f-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"正在尝试其它镜像。updates/7/x86_64/primary_db    FAILED                                          http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/9700f154a034cedf59ca9c4f0a1466cc4dccaeb7db2e20b7e247e9e8a3a5fbc5-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"正在尝试其它镜像。(8/10): extras/7/x86_64/primary_db                      | 194 kB   00:00     (9/10): base/7/x86_64/filelists_db                      | 7.1 MB   00:00     (10/10): updates/7/x86_64/primary_db                    | 2.1 MB   00:00     元数据缓存已建立

不使用阿里云的ECS,就会出现Couldn't resolve host 'mirrors.cloud.aliyuncs.com信息,但不影响其正常使用。

配置epel源

在这里插入图片描述
在这里插入图片描述

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

建立缓存,一般不会出错

yum makecache 已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.combase                                                  | 3.6 kB     00:00     epel                                                  | 4.7 kB     00:00     extras                                                | 2.9 kB     00:00     updates                                               | 2.9 kB     00:00     (1/6): epel/x86_64/group_gz                             |  95 kB   00:00     (2/6): epel/x86_64/updateinfo                           | 1.0 MB   00:00     (3/6): epel/x86_64/prestodelta                          | 4.0 kB   00:00     (4/6): epel/x86_64/primary_db                           | 6.8 MB   00:01     (5/6): epel/x86_64/other_db                             | 3.3 MB   00:00     (6/6): epel/x86_64/filelists_db                         |  12 MB   00:02     元数据缓存已建立

配置Ceph源

在阿里云开源镜像站中找到Ceph

在这里插入图片描述

转到其下载网址

在这里插入图片描述

其中就是各版本的Ceph

在这里插入图片描述

例如,下载其中的rpm-15.2.2/版本的Ceph

在这里插入图片描述

选择el7,也就是Centos7版本。

在这里插入图片描述

将其中这两项的路径写入到Ceph源文件,其目录内就是具体的软件包

cat >>/etc/yum.repos.d/ceph.repo<< eof[ceph]	#路径为以上的x86_64目录name=cephbaseurl=https://mirrors.aliyun.com/ceph/rpm-15.2.2/el7/x86_64/gpgcheck=0enabled=1[ceph-noarch]	#路径为以上noarch目录name=ceph-noarchbaseurl=https://mirrors.aliyun.com/ceph/rpm-15.2.2/el7/noarch/gpgcheck=0enabled=1eof

安装Ceph及组件

安装epel-release及yum相关组件

yum -y install epel-release yum-plugin-priorities yum-utils

安装Ceph及相关组件

yum install -y ceph-deploy ceph ceph-radosgw snappy leveldb gdisk python-argparse gperftools-libs

查看ceph版本

ceph -vceph version 15.2.2 (0c857e985a29d90501a285f242ea9c008df49eb8) octopus (stable)

下载地址:
linux下ceph分布式安装使用教程
CentOS7环境中DHCP配置教程
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1