Preparing the Environment
Preparing Software Packages
Before installing the software on a client/server, compile Ceph on a compilation server to obtain the adapter RPM package for the client and the cephlib.tar.gz package for the server. Prepare the following installation packages for the compilation:
- Ceph source package: ceph-14.2.8.tar.gz
- Patch packages: ceph-global-cache.patch, ceph-global-cache-tls.patch, and globalcache-ceph-adaptor-spec.patch
- Closed-source package depended by adapter compilation: 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)
Compilation servers are classified into x86 and ARM ones. Installation packages compiled using an x86 compilation server can be used only on x86 nodes, and installation packages compiled using an ARM compilation server can be used only on ARM nodes.
Configuring the Compilation Environment
- Configure the local liboath source.
- Download the liboath source code and patch.
1 2 3 4
yum install git -y git config --global http.sslVerify false cd /root git clone https://gitee.com/src-openeuler/oath-toolkit/tree/openEuler-21.03-20210330
- Install the dependencies required for RPM packaging using a Yum source.
1yum install wget rpmdevtools gtk-doc pam-devel xmlsec1-devel libtool libtool-ltdl-devel createrepo cmake -y
The Yum source is the default public network source of the system. You can run the following command after configuring the proxy in the native system.
- Create an rpmbuild directory. Move the patch file and source package to the /root/rpmbuild/SOURCES directory.
1 2 3 4
rpmdev-setuptree cd /root/oath-toolkit mv 0001-oath-toolkit-2.6.5-lockfile.patch /root/rpmbuild/SOURCES mv oath-toolkit-2.6.5.tar.gz /root/rpmbuild/SOURCES
- Copy the spec file to the specified RPM package compilation directory.
cp oath-toolkit.spec /root/rpmbuild/SPECS/
- Compile the RPM package.
1rpmbuild -bb /root/rpmbuild/SPECS/oath-toolkit.spec
- Use the compiled RPM package as the local Yum source.
1 2 3
mkdir -p /home/oath cp -r /root/rpmbuild/RPMS/* /home/oath/ cd /home/oath && createrepo .
- Configure the Repo file.
1vi /etc/yum.repos.d/local.repoAdd the following content to the file:1 2 3 4 5 6
[local-oath] name=local-oath baseurl=file:///home/oath enabled=1 gpgcheck=0 priority=1
- Download the liboath source code and patch.
- Set the Yum certificate verification status to be verification-free.
1vi /etc/yum.confAdd the following content to the end of the file:1 2
sslverify=false deltarpm=0
- Configure the pip Huawei proxy to increase the download speed.
1 2
mkdir -p ~/.pip vi ~/.pip/pip.conf
Add the following content:
1 2 3 4
[global] timeout = 120 index-url = https://repo.huaweicloud.com/repository/pypi/simple trusted-host = repo.huaweicloud.com
- Install the dependencies required for compiling the Ceph source code.
1yum install java-devel sharutils checkpolicy selinux-policy-devel gperf cryptsetup fuse-devel gperftools-devel libaio-devel libblkid-devel libcurl-devel libudev-devel libxml2-devel libuuid-devel ncurses-devel python-devel valgrind-devel xfsprogs-devel xmlstarlet yasm nss-devel libibverbs-devel openldap-devel CUnit-devel python2-Cython python3-setuptools python-prettytable lttng-ust-devel expat-devel junit boost-random keyutils-libs-devel openssl-devel libcap-ng-devel python-sphinx python2-sphinx python3-sphinx leveldb leveldb-devel snappy snappy-devel lz4 lz4-devel liboath liboath-devel libbabeltrace-devel librabbitmq librabbitmq-devel librdkafka librdkafka-devel libnl3 libnl3-devel rdma-core-devel numactl numactl-devel numactl-libs createrepo openldap-devel rdma-core-devel lz4-devel expat-devel lttng-ust-devel libbabeltrace-devel python3-Cython python2-Cython gperftools-devel bc dnf-plugins-core librabbitmq-devel rpm-build java-1.8.0-openjdk-devel python3-devel -y
- Regenerate the rpmbuild directory in /home.
- Open the .rpmmacros file.
1vi /root/.rpmmacrosChange the value of %_topdir to /home/rpmbuild.

- Run the rpmbuild installation command again.
1rpmdev-setuptree
- Open the .rpmmacros file.