Creating a Ceph RPM Package
- Install rpmbuild.
1 2
yum install rpmdevtools -y rpmdev-setuptree
If you perform the compilation as the root user, an rpmbuild directory is generated in the /root directory. The compilation occupies 20 GB to 30 GB of space. If the /root directory has a smaller space, replace the rpmbuild directory with another one, for example, /home.
- Modify the .rpmmacros file.
- Open the .rpmmacros file.
1vim /root/.rpmmacros
- Press i to enter the insert mode and set %_topdir to /home/rpmbuild.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the .rpmmacros file.
- Run the following command to install rpmbuild again:
1rpmdev-setuptree
- Copy the ceph.spec file.
1cp ceph.spec /home/rpmbuild/SPECS/
- Copy the source package.
1 2 3
cd /home/ tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8 cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
- Build an RPM package.
- On CentOS 7.6:
1rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec
- On openEuler 20.03:
- Move performance.sh to the /home directory.
1 2
mv /etc/profile.d/performance.sh /home/ source /etc/profile
- Build an RPM package.
1rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec
- Restore performance.sh.
1 2
mv /home/performance.sh /etc/profile.d/ source /etc/profile
- Move performance.sh to the /home directory.
- On CentOS 7.6:
Parent topic: Compiling and Deploying Ceph