编译时“/home”目录下需要100GB容量。
所需软件包:
1 2 3 4 5 6 7 8 9 | cd /home 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 |
1 | rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.4.1.oe1.aarch64.rpm |
1 | rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.4.1.oe1.x86_64.rpm |
1 | source /etc/profile |
1 2 | cd /home tar -zxvf mxml-3.2.tar.gz |
1 2 3 4 | cd mxml-3.2 ./configure make all make install |
1 2 | cd /home/ceph-14.2.8/ sh install-deps.sh |
“install-deps.sh”脚本如果执行失败,可以尝试切换代理后重新运行。openEuler 20.03 LTS SP3版本操作系统存在两个版本的PostgreSQL,安装时会冲突,为避免冲突时脚本退出,需要删除“install-deps.sh”中的set -e后执行脚本。
1 | sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec.in |
1 2 | cd /home tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8 |
1 | cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/ |
1 | cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/ |
1 | vim /root/.rpmmacros
|
1 | rm -rf /etc/profile.d/performance.sh |
1 2 | unset GOMP_CPU_AFFINITY rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec |
编译过程需要花费半小时以上,编译完成后会在“/home/rpmbuild/RPMS/”目录下生成两个目录“aarch64”和“noarch”,其中包含有Ceph相关的RPM包。