下面隨小編一起去看看centos7.1手動安裝ceph的方法吧!
1.準備環境
#centos7.1主機一台
更新yum來源
[root@cgsl ]# yum -y update
2.安裝金鑰 把金鑰加入你係統的可信任金鑰清單內,以消除安全警報。
[root@cgsl ]# sudo rpm --import <a href="https://www.php.cn/link/bb1634f001578f89ee3eab364ed22432" rel="nofollow" target="_blank" >'https://www.php.cn/link/bb1634f001578f89ee3eab364ed22432'</a>
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://www.php.cn/link/bb1634f001578f89ee3eab364ed22432 [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://www.php.cn/link/bb1634f001578f89ee3eab364ed22432 [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://www.php.cn/link/bb1634f001578f89ee3eab364ed22432 [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
以上是如何在CentOS 7.1上手動安裝Ceph集群的詳細內容。更多資訊請關注PHP中文網其他相關文章!