下面隨小編一起去看看centos7.1手動(dòng)安裝ceph的方法吧!
1.準(zhǔn)備環(huán)境
centos7.1主機(jī)一臺(tái)
更新yum源
[root@cgsl ]# yum -y update
2.安裝密鑰 把密鑰加入你系統(tǒng)的可信密鑰列表內(nèi),以消除安全告警。
[root@cgsl ]# sudo rpm --import 'https://download.ceph.com/keys/release.asc'
3.獲取RPM 二進(jìn)制包 你需要在 /etc/yum.repos.d/ 目錄下新增一個(gè) Ceph 庫:創(chuàng)建 ceph.repo 。 些 Ceph 包(如 EPEL )必須優(yōu)先于標(biāo)準(zhǔn)包,所以你必須確保設(shè)置了 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 依賴一些第三方庫。執(zhí)行下列命令添加 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.確認(rèn) /etc/yum/pluginconf.d/priorities.conf 文件存在。
[root@cgsl ]# vim /etc/yum/pluginconf.d/priorities.conf
7.安裝依賴的的軟件包:
[root@cgsl ]# yum install snappy leveldb gdisk python-argparse gperftools-libs
8.安裝ceph
[root@cgsl ]# yum install ceph