CentOS 7.6 源碼編譯安裝Ceph

1. 從github下載ceph項目及其子項目源碼

git clone https://github.com/ceph/ceph.git
git submodule update --init --recursive

2.配置好國內yum源

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

運行源碼目錄下install-deps.sh,安裝依賴包

cd ceph
./install-deps.sh

 

3.運行以下腳本

./do_cmake.sh
cd build
make

 

yum源問題:

1.Base源:

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

2.epel源:

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

3.CentOS-SCLo-rh源:

https://blog.csdn.net/HD2killers/article/details/82728775

其他問題:

1.No CMAKE_CXX_COMPILER could be found.

解決辦法:

yum install gcc-c++ ncurses-devel bison

2.  Can't find sphinx-build.

解決辦法:

yum install python-sphinx

3.GCC 7+ required due to C++17 requirements

解決辦法:

$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash

爲了避免每次手動生效,可以在.bashrc中設置:

source /opt/rh/devtoolset-7/enable
or
source scl_source enable devtoolset-7

4.Could NOT find verbs (missing: VERBS_LIBRARIES VERBS_INCLUDE_DIR)

解決辦法:

yum install rdma-core-devel

5.Could NOT find udev (missing: UDEV_LIBRARIES UDEV_INCLUDE_DIR)

解決辦法:

yum install systemd-devel

6.Could NOT find blkid (missing: BLKID_LIBRARIES BLKID_INCLUDE_DIR)

解決辦法:

yum install libblkid-devel

7.Could NOT find keyutils (missing: KEYUTILS_LIBRARIES KEYUTILS_INCLUDE_DIR)

yum install keyutils-libs-devel

8.Could NOT find OpenLdap (missing: OPENLDAP_INCLUDE_DIR LDAP_LIBRARY

yum install openldap-devel

9.Could NOT find leveldb (missing: LEVELDB_LIBRARIES LEVELDB_INCLUDE_DIR)

yum install leveldb-devel

10.Could NOT find snappy (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR)

yum install snappy-devel

11.Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR) (Required is at
  least version "1.7")

yum install lz4-devel

12.Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)

yum install curl-devel

其他:

yum install libaio-devel openssl-devel expat-devel liboath-devel lttng-ust-devel libbabeltrace-devel python36-Cython fuse-devel libnl3-devel librabbitmq-devel libcap-ng-devel gperf librabbitmq-devel librdkafka-devel

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章