Compiling and Verifying Ceph
Preparing the Compilation Environment
- Modify the yum.conf file.
- Open the file.
1vim /etc/yum.conf - Press I to enter the insert mode and add sslverify=false and deltarpm=0.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the file.
- (Optional) Modify the scl REPO file.This file needs to be modified only when CentOS 7.6 is used.
- Download and open the file.
1 2
yum -y install centos-release-scl vim /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
- Press I to enter the insert mode and change http to https.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Download and open the file.
- (Optional) Modify the requirements.txt file of the dashboard.This file needs to be modified only when CentOS 7.6 is used.
- Open the file.
1vim /home/ceph-14.2.8/src/pybind/mgr/dashboard/requirements.txt - Press I to enter the insert mode and comment out pyopenssl.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the file.
Compiling Software
- Upgrade isa-l.
The version of isa-l contained in the Ceph 14.2.8 source code is early. Upgrade isa-l.
- Go to the src directory.
1cd /home/ceph-14.2.8/src
- Back up the original isa-l and obtain the latest isa-l 2.29 source code.
1 2 3 4
mv isa-l isa-l.bak wget https://github.com/intel/isa-l/archive/refs/tags/v2.29.0.tar.gz --no-check-certificate tar -xzvf v2.29.0.tar.gz mv isa-l-2.29.0 isa-l
- Modify some isa-l source code to adapt to AArch64.
For details, visit GitHub.
In the file, the red lines are to be deleted, and the green lines are to be added and modified.
After the upgrade is complete, the aarch64 directory exists in isa-l/erasure_code/.

- Go to the src directory.
- Install the dependencies.
- On CentOS 7.6:
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
- On openEuler 20.03:
1 2
cd /home/ceph-14.2.8/ sh install-deps.sh
- On CentOS 7.6:
- Modify do_cmake.sh.
- Open the file.
1vim do_cmake.sh - Press i to enter the insert mode and modify the file as follows:
${CMAKE} -DCMAKE_BUILD_TYPE=RelWithDebInfo $ARGS "$@" .. || exit 1
Comment out git submodule update --init --recursive to prevent isa-l from being rolled back to the old version when building an RPM package.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the file.
- Execute do_cmake.sh.
1sh do_cmake.sh
- Start the compilation.The compilation requires GCC 7 or later. Make the compilation environment ready. {number} in the following indicates the number of jobs during compilation. Generally, a larger value indicates a faster compilation speed. However, the value cannot exceed the number of CPU cores.
1 2
cd /home/ceph-14.2.8/build make -j{number}
- Perform a unit test.
1ctest3 -V -R unittest_erasure_code

- Delete the build directory.
1 2
cd /home/ceph-14.2.8/ rm -rf build
Parent topic: Compiling and Deploying Ceph