安装环境
系统信息
NAME="Oracle Linux Server"
VERSION="9.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.4
软件源
[root@a754fdf885ce data]# yum repolist
repo id repo name
ol9_appstream Oracle Linux 9 Application Stream Packages (x86_64)
ol9_baseos_latest Oracle Linux 9 BaseOS Latest (x86_64)
编译演示路径/data
GlusterFS安装
1. 安装所需软件源
dnf install epel-release
dnf config-manager --set-enabled ol9_codeready_builder
2. 更新依赖
yum clean all && yum update -y && yum makecache
3. 安装官网推荐的依赖
yum install -y autoconf automake bison dos2unix flex fuse-devel glib2-devel \
libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel \
librdmacm-devel libtirpc-devel libuuid-devel libtool libxml2-devel \
lvm2-devel make openssl-devel pkgconfig xz-devel python3-devel \
python3-netifaces python3-paste-deploy python3-simplejson python3-sphinx \
python3-webob python3-pyxattr readline-devel rpm-build sqlite-devel \
systemtap-sdt-devel tar userspace-rcu-devel rpcgen liburing-devel
#安装git
yum install -y git
如果存在依赖冲突,单独安装即可
4. 通过git拉取官方源码
git clone https://github.com/gluster/glusterfs.git
cd glusterfs
git checkout v10.5
5. 开始编译安装
configure
./autogen.sh
./configure
configure: error: tcmalloc library needs to be present
yum install -y gperftools-devel
处理完问题之后,继续执行./configure
输出以下信息,即为成功
GlusterFS configure summary
===========================
FUSE client : yes
epoll IO multiplex : yes
fusermount : yes
readline : yes
georeplication : yes
Linux-AIO : yes
Linux io_uring : yes
Use liburing : yes
Enable Debug : no
Run with Valgrind : no
Sanitizer enabled : none
XML output : yes
Unit Tests : no
Track priv ports : yes
POSIX ACLs : yes
SELinux features : yes
firewalld-config : no
Events : yes
EC dynamic support : x64 sse avx
Use memory pools : no
Nanosecond m/atimes : yes
Server components : yes
Legacy gNFS server : no
IPV6 default : no
Use TIRPC : yes
With Python : 3.9
Cloudsync : yes
Metadata dispersal : no
Link with TCMALLOC : yes
Enable Brick Mux : no
Building with LTO : yes
make
make
执行过程中无报错,输出以下信息为成功
make[2]: Leaving directory '/data/glusterfs/events'
make[2]: Entering directory '/data/glusterfs'
make[2]: Leaving directory '/data/glusterfs'
make[1]: Leaving directory '/data/glusterfs'
开始make install
make install
执行过程中无报错,输出以下信息为成功
make[2]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
/usr/bin/install -c -m 644 glusterfs-api.pc libgfchangelog.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/data/glusterfs'
make[1]: Leaving directory '/data/glusterfs'
配置服务启动
systemctl daemon-reload
systemctl start glusterd
NFS-Ganesha安装
1.安装所需的软件源
yum install -y cmake gcc-c++ krb5-devel
2.通过git拉取源码
git clone https://github.com/nfs-ganesha/nfs-ganesha
cd nfs-ganesha
git submodule update --init --recursive
git checkout V5.9
3. 编译安装
cmake
mkdir build
cd build
cmake ../src -DNSL_LIBRARY=$(pwd)/../src/libntirpc/src \
-DUSE_FSAL_GLUSTER=on -DPKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
DPKG_CONFIG_PATH需要设置为包含glusterfs-api.pc文件的路径,可使用find / -name "glusterfs-api.pc"
输出如下结果代表成功
-- Generating done (0.1s)
-- Build files have been written to: /data/nfs-ganesha/build
make
make && make install
输出如下信息代表make成功
[100%] Linking C shared module libfsalmem.so
[100%] Built target fsalmem
输出如下信息代表make install成功
-- Installing: /usr/lib64/libntirpc.so.5.8
-- Set runtime path of "/usr/lib64/libntirpc.so.5.8" to ""
-- Up-to-date: /usr/lib64/libntirpc.so
-- Installing: /usr/lib64/ganesha/libfsalnull.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalnull.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalvfs.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalvfs.so" to ""
-- Installing: /usr/lib64/ganesha/libfsaldummylustre.so
-- Set runtime path of "/usr/lib64/ganesha/libfsaldummylustre.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalproxy_v4.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalproxy_v4.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalproxy_v3.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalproxy_v3.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalsaunafs.so
-- Installing: /usr/lib64/ganesha/libfsalgpfs.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalgpfs.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalgluster.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalgluster.so" to ""
-- Installing: /usr/lib64/ganesha/libfsalmem.so
-- Set runtime path of "/usr/lib64/ganesha/libfsalmem.so" to ""
-- Installing: /usr/lib64/libganesha_nfsd.so.5.9
-- Set runtime path of "/usr/lib64/libganesha_nfsd.so.5.9" to ""
-- Up-to-date: /usr/lib64/libganesha_nfsd.so
4. 启动服务
cd nfs-ganesha/src/scripts/systemd
cp –a nfs-ganesha-lock.service.el7 nfs-ganesha.service.el7 /usr/lib/systemd/system/
cd /usr/lib/systemd/system/
mv nfs-ganesha-lock.service.el7 nfs-ganesha-lock.service
mv nfs-ganesha.service.el7 nfs-ganesha.service
systemctl daemon-reload
标签:ganesha,OracleLinux9,--,devel,GlusterFS,nfs,usr,so,lib64
From: https://www.cnblogs.com/RHbyCIwRMQ0T/p/18337703