Compiling Client Installation Packages
The /home directory must be 100 GB or larger for the compilation.
- Obtain ceph-14.2.8.tar.gz, ceph-global-cache.patch, globalcache-ceph-adaptor-spec.patch, ceph-global-cache-tls.patch, and boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.aarch64.rpm (ARM) or boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.x86_64.rpm (x86) and save them to /home.
- Decompress the Ceph source code in the /home directory, install the patches for the Ceph source code, and generate the client package.
1 2 3 4 5 6 7 8
tar -zxvf ceph-14.2.8.tar.gz cp ceph-global-cache.patch ceph-14.2.8 cp globalcache-ceph-adaptor-spec.patch ceph-14.2.8 cp ceph-global-cache-tls.patch ceph-14.2.8 cd ceph-14.2.8 patch -p1 < ceph-global-cache.patch patch -p1 < globalcache-ceph-adaptor-spec.patch patch -p1 < ceph-global-cache-tls.patch
- Install the closed-source RPM package obtained from the Huawei Enterprise or Carrier website.
In the ARM environment:
rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.aarch64.rpm
In the x86 environment:
rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.x86_64.rpm
- Make the environment variables that are configured during the RPM package installation take effect.
1source /etc/profile
- 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.
- Compile and install mxml.
- Download mxml-3.2.tar.gz from the open source website and save it to the /home directory.
- Decompress mxml-3.2.tar.gz.
1 2
cd /home tar -zxvf mxml-3.2.tar.gz
- Configure, compile, and install mxml.
cd mxml-3.2 ./configure make all make install
- Run install-deps.sh to install the dependencies.
1 2
cd /home/ceph-14.2.8/ sh install-deps.sh
If the install-deps.sh script fails to be executed, try again using another proxy. openEuler 20.03 LTS SP3 has two versions of PostgreSQL, which conflict with each other during the installation. To prevent the script exit due to the conflict, delete set -e from the install-deps.sh script and then run the script.
- Modify the ceph.spec.in file.
1sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec.in

- Go back to the parent directory and compress the ceph-14.2.8 directory into a tar.bz2 package.
1 2
cd /home tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8
- Copy the ceph.spec file to the SPECS directory.
1cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
Save the package file to the SOURCES directory.1cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
- Modify the rpmmacros file and comment out the content in the red box:
1vi /root/.rpmmacros
- Delete /etc/profile.d/performance.sh to increase the compilation speed.
1rm -rf /etc/profile.d/performance.sh
- Start a new terminal for the previous step to take effect and run the rpmbuild command to start the compilation.
1 2
unset GOMP_CPU_AFFINITY rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec
The compilation takes a long time. After the compilation is complete, the aarch64 and noarch directories are generated in the /home/rpmbuild/RPMS/ directory. The directories include the Ceph-related RPM packages.
