---
title: 编译Ceph并验证
description: "以下编译操作仅适用于CentOS 7.6操作系统，基于openEuler 20.03 LTS SP1操作系统编译Ceph请参考《Ceph 14.2.8 移植指南（CentOS 7.6&openEuler 20.03）(https://www.hikunpeng.com/document/detail/zh/kunpengsdss/ecosystemEnable/Ceph/kunpengcephoe_02_0001.html)》。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengaccel/storage/dataReduc/kunpengkpszip_20_0010.html
sourcePath: /source/zh/kunpengaccel/storage/dataReduc/kunpengkpszip_20_0010.html
indexId: 9b7bfca690f9585be7e4956715570329913224d9940840f2878a75f6d07f4fad68
---
# 编译Ceph并验证

以下编译操作仅适用于CentOS 7.6操作系统，基于openEuler 20.03 LTS SP1操作系统编译Ceph请参考《Ceph 14.2.8 移植指南（CentOS 7.6&openEuler 20.03）(https://www.hikunpeng.com/document/detail/zh/kunpengsdss/ecosystemEnable/Ceph/kunpengcephoe_02_0001.html)》。

1. 编译环境准备。

  a. 修改“yum.conf”文件。

    1. 打开“/etc/yum.conf”文件。
      1 vi /etc/yum.conf

    2. 按“i”进入编辑模式，在文件末尾添加sslverify=false和deltarpm=0。
    3. 按“Esc”键退出编辑模式，输入:wq！，按“Enter”键保存退出文件。
  b. 安装SCL库。

```
yum -y install centos-release-scl
```


  c. 修改“scl repo”文件。

    1. 打开“/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo”文件。
      1 vi /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

    2. 按“i”进入编辑模式，将http修改为https。
    3. 按“Esc”键退出编辑模式，输入:wq!，按“Enter”键保存退出文件。
  d. 修改“ceph.spec”文件。

    1. 进入“/home/ceph-14.2.8/”目录。

```
cd /home/ceph-14.2.8/
```


    2. 打开“ceph.spec.in”。
      1 vi ceph.spec.in

    3. 按“i”进入编辑模式，将scipy版本修改为python36-scipy。
    4. 按“Esc”键退出编辑模式，输入:wq!，按“Enter”键保存退出文件。
  e. 修改“dashboard”的“requirements.txt”。

    1. 打开“/home/ceph-14.2.8/src/pybind/mgr/dashboard/requirements.txt”。
      1 vi /home/ceph-14.2.8/src/pybind/mgr/dashboard/requirements.txt

    2. 按“i”进入编辑模式，注释“pyopenssl”。
    3. 按“Esc”键退出编辑模式，输入:wq!，按“Enter”键保存退出文件。
2. 安装依赖。
  1 2 3 4 yum -y install epel-release yum -y install python36-scipy.aarch64 cd /home/ceph-14.2.8/ sh install-deps.sh

3. 编译。
  1 2 3 4 scl enable devtoolset-8 bash sh do_cmake.sh cd build make -j 48

4. UT测试。
  1 ctest3 -V -R unittest_compression

5. 删除“build”目录。
  1 2 cd /home/ceph-14.2.8/ rm -rf build
