ceph 16.25工程管理脚本用了dnf和dnf-utlis,centos7(软件库比较老,且p版本已经不支持centos7)安装部署比较麻烦,所以最好用centos8做编译环境。
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