Compiling and Verifying Ceph
CentOS 7.6
- Modify the ceph.spec file.
1 2
cd /home/ceph-14.2.8/ vi ceph.spec.in
Change the SciPy version to python36-scipy.

- Modify the requirements.txt file in the dashboard folder.
1vi /home/ceph-14.2.8/src/pybind/mgr/dashboard/requirements.txtComment out pyopenssl.

- Install the dependencies.
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
- Perform the compilation.
1 2 3
sh do_cmake.sh cd build make -j 48
- Performs a unit test (UT).
1ctest3 -V -R unittest_compression

- Delete the build directory.
1 2
cd /home/ceph-14.2.8/ rm -rf build
openEuler 20.03
- Use EPEL to install the dependencies that are missing in openEuler.
- Configure the EPEL source.
1vi /etc/yum.repos.d/epel.repoAdd the following content:
1 2 3 4 5 6
[epel] name=epel baseurl=https://repo.huaweicloud.com/epel/7/aarch64/ enabled=1 gpgcheck=0 priority=1
- Use the EPEL source to install dependencies.
1yum install python-routes python-tox -y
- Delete the EPEL source.
1rm -rf /etc/yum.repos.d/epel.repo
The EPEL source must be deleted. Otherwise, an RPM package that conflicts with openEuler will be downloaded from the EPEL source in subsequent steps.
- Configure the EPEL source.
- Modify the Ceph-related code to make it compatible with openEuler.
1cd /home/ceph-14.2.8/
- Add openEuler to the install-deps.sh file.
vim install-deps.sh

- Modify the ceph.spec.in file.
1sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec.in
- Modify the ceph.spec file.
1vim ceph.spec- Add the following information to the start of the file:
1%define _binaries_in_noarch_packages_terminate_build 0
- As shown in the following figure, set CEPH_MFLAGS_JOBS="-j48" to improve the compilation speed of openEuler.

- Add the following information to the start of the file:
- Add openEuler to the install-deps.sh file.
- Install and compile the dependency.
- Install the dependency.
1 2
cd /home/ceph-14.2.8/ sh install-deps.sh
- Perform the compilation.
1 2 3
sh do_cmake.sh cd build make -j 48
- Performs a unit test (UT).
1ctest3 -V -R unittest_compression

- Install the dependency.
Parent topic: Compiling and Deploying Ceph