• centos7.4 nfs-2.3.2


    http://www.linuxfromscratch.org/blfs/view/svn/basicnet/libtirpc.html

    注释:安装环境centos7.4;   安装完软件成后会升级系统版本,内核版本不变

    #安装软件
    yum -y install libwrap libwrap-devel libtirpc libtirpc-devel libevent libevent-devel device-mapper-event-libs device-mapper-libs libdevmapper libdevmapper-devel device-mapper-devel libblkid libblkid-devel dh-autoreconf rpcbind redhat-lsb initscripts libnfs-utils
    yum -y install autoconf automake libtool

    #解压包
    tar xf nfs-utils-2.3.2.tar.gz
    cd nfs-utils-2.3.2
    sed -i '/strict-prototypes/d' configure.ac
    autoreconf -fiv

    #编译
    ./configure --prefix=/usr
    --sysconfdir=/etc
    --sbindir=/usr/sbin
    --without-tcp-wrappers
    --disable-nfsv4
    --disable-gss

    make && make install

    #授权
    chmod u+w,go+r /sbin/mount.nfs
    mkdir /opt/data
    chown -R nobody.nobody /opt/data

    #配置挂载信息
    cat /etc/exports
    /opt/data 10.111.6.218/24(rw,subtree_check,anonuid=99,anongid=99)
    exportfs -rv

    #启动进程
    systemctl start rpcbind

    cat > /etc/sysconfig/nfs-server << "EOF"
    PORT="2049"
    PROCESSES="8"
    KILLDELAY="10"
    EOF
    此时在上传另一个启动脚本
    tar xf blfs-bootscripts-20180105.tar.xz
    cd blfs-bootscripts-2018010
    make install-nfs-server
    /etc/init.d/nfs-server start

    systemctl daemon-reload

    #检测
    netstat -luntp|grep 2049
    netstat -luntp|grep 111

    #检测本地挂载
    showmount -e localhost

    ***********Clicent************
    #查看可挂载的文件
    showmount -e 10.111.6.218

    mount -t nfs 10.111.6.218:/opt/data /mnt

    #需开放端口

  • 相关阅读:
    黑苹果安装 this is an unknown cpu model 0x3a
    JQMobile引入外部CSS,JS文件
    iphone系统更新 3002错误
    移动端HTML5框架
    花生壳动态域名解析使用
    win7 配置IIS + php 环境
    php在字符串中替换多个字符
    PHP 获取文件名和扩展名的方法
    Mysql无法创建外键的原因
    wordpress无法登录的解决方法
  • 原文地址:https://www.cnblogs.com/huangyanqi/p/9604608.html
Copyright © 2020-2023  润新知