centos7.1如何手动安装ceph

时间:2022-06-20 01:35:39

下面随小编一起去看看centos7.1手动安装ceph的方法吧!

1.准备环境

centos7.1主机一台

更新yum源

[root@cgsl ]# yum -y update

2.安装密钥 把密钥加入你系统的可信密钥列表内,以消除安全告警。

[root@cgsl ]# sudo rpm --import 'https://download.ceph.com/keys/release.asc'

3.获取RPM 二进制包 你需要在 /etc/yum.repos.d/ 目录下新增一个 Ceph 库:创建 ceph.repo 。 些 Ceph 包(如 EPEL )必须优先于标准包,所以你必须确保设置了 priority=2 。

[root@cgsl ]# vim /etc/yum.repos.d/ceph.repo
[ceph]
name=Ceph packages for $basearch
baseurl=http://download.ceph.com/rpm-jewel/el7/$basearch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

[ceph-noarch]
name=Ceph noarch packages
baseurl=http://download.ceph.com/rpm-jewel/el7/noarch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

[ceph-source]
name=Ceph source packages
baseurl=http://download.ceph.com/rpm-jewel/el7/SRPMS
enabled=0
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

[apache2-ceph-noarch]
name=Apache noarch packages for Ceph
baseurl=http://gitbuilder.ceph.com/ceph-rpm-centos7-x86_64-basic/ref/master/SRPMS
#baseurl=http://gitbuilder.ceph.com/ceph-rpm-centos7-x86_64-basic/ref/master
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/autobuild.asc

[apache2-ceph-source]
name=Apache source packages for Ceph
baseurl=http://gitbuilder.ceph.com/ceph-rpm-centos7-x86_64-basic/ref/master/SRPMS
#baseurl=http://gitbuilder.ceph.com/ceph-rpm-centos7-x86_64-basic/ref/master
enabled=0
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/autobuild.asc

4.下载软件包 Ceph 依赖一些第三方库。执行下列命令添加 EPEL 库:

[root@cgsl ]# su -c 'rpm -Uvh http://download.ceph.com/rpm-jewel/el7/noarch/ceph-release-1-1.el7.noarch.rpm '

[root@cgsl ]# su -c 'rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm '

5.安装 yum-plugin-priorities 。

[root@cgsl ]# yum install yum-plugin-priorities

6.确认 /etc/yum/pluginconf.d/priorities.conf 文件存在。

[root@cgsl ]# vim /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1

7.安装依赖的的软件包:

[root@cgsl ]# yum install snappy leveldb gdisk python-argparse gperftools-libs

8.安装ceph

[root@cgsl ]# yum install ceph