在centos8上生成nfs-ganesha的相关rpm
1.背景
在某些情况下,可能需要在CentOS 8上从源代码生成NFS Ganesha的RPM包,特别是当内置的软件仓库提供的NFS Ganesha版本不能满足需求时,以及在类似系统上操作,打包ganesha的rpm。
2.依赖环境准备
2.1配置yum源
CentOS 8已于2021年12月31日寿终正非,但软件包仍在官方镜像上保留了一段时间。现在他们被转移到https://vault.centos.org,如果仍然需要运行的旧CentOS 8,可以在/etc/yum.repos中更新repos.d使用vault.centos.org代替mirror.centos.org。
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
有一些源没有启用,需要启用,因为有的包不仅仅是在baseos、appstream、extras中的,不好分辨的情况下将除了本地源之外的都启用
sed -i 's#enabled=0#enabled=1#g' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo
sed -i 's#enabled=0#enabled=1#g' /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo
sed -i 's#enabled=0#enabled=1#g' /etc/yum.repos.d/CentOS-Linux-Plus.repo
sed -i 's#enabled=0#enabled=1#g' /etc/yum.repos.d/CentOS-Linux-FastTrack.