ceph:原始碼編譯 nfs-ganesha 2.8.4 (V2-stable)

jinzhenshui發表於2024-09-06

step 1:

從github下載nfs-ganesha ( 標籤2.8.4或分支V2-stable )

同時下載相應程式碼庫中指定的版本的 libntirpc 庫程式碼!注意版本一致。注意ntirpc放到src目錄中,要改名為libntirpc或直接做個符號連結libntirpc。

step 2:

根據你自己的要求或希望的功能,安裝依賴

step 3:

cmake 生成make檔案,在此次可以指定功能開關、功能選項

step 4:執行make 編譯、安裝等

我的相關shell指令碼如下:

 
yum install -y  make cmake gcc gcc-c++ kernel-devel kernel-headers

yum install -y  jemalloc-devel

yum install -y  krb5-devel
yum install -y  userspace-rcu-devel
yum install -y  bison bison-devel
yum install -y  flex flex-devel

yum install -y  libnsl2-devel
yum install -y  uuid uuid-devel uuid-c++-devel
yum install -y  libunwind-devel
yum install -y  nfs-utils-devel
yum install -y  libacl-devel
yum install -y  dbus-devel
yum install -y  libcap-devel libcap-ng-devel

yum install -y  libtirpc-devel libtirpc
#yum install -y  grpc-devel

yum install -y  libcephfs-devel librgw-devel

yum install -y  xfsprogs-devel

#yum install -y  glusterfs-devel
#yum install -y  libwbclient-devel
#yum install -y  glibc-compat

yum install -y  git
yum install -y  rpmrebuild selinux-policy-devel

yum install -y  kylin-lsb
yum install -y  doxygen

git clone  --branch V6.0    --recursive https://github.com/nfs-ganesha/nfs-ganesha.git
git clone  --branch V5.9    --recursive https://github.com/nfs-ganesha/nfs-ganesha.git
git clone  --branch V4.4.1  --recursive https://github.com/nfs-ganesha/nfs-ganesha.git

#git clone  --branch V5-table     --recursive https://github.com/nfs-ganesha/nfs-ganesha.git
#git clone  --branch V4-table     --recursive https://github.com/nfs-ganesha/nfs-ganesha.git
#git clone  --branch V3-table     --recursive https://github.com/nfs-ganesha/nfs-ganesha.git

mkdir bld
cd    bld

cd ~/bld && rm -rf * && cmake ~/nfs-ganesha/src       && make -j2
cd ~/bld && rm -rf * && cmake ~/nfs-ganesha/src       && make -j2

cd ~/bld && rm -rf * && cmake ~/nfs-ganesha-4.4.1/src && make -j2 
cd ~/bld && rm -rf * && cmake ~/nfs-ganesha-4.4.1/src && make -j2 rpm

#make -j2 rpm
#make install

相關文章