美文网首页
搭建、挂载nfs及卸载

搭建、挂载nfs及卸载

作者: 只想做个俗人_贪财_好色 | 来源:发表于2021-08-20 17:00 被阅读0次

    搭建

    1、 安装 nfs 和 rpc

    yum install nfs-utils rpcbind -y
    
    rpm -qa nfs-utils rpcbind
    

    2、运行 rpc 和 nfs (先启动RPC服务,然后再启动NFS服务)

    systemctl start rpcbind
    systemctl start nfs-server
    
    

    5、 查看 rpc 和nfs 是否启动

    ps -ef|grep rpc
    ps -ef|grep nfs
    

    6、可以设置开机自启动

    systemctl enable rpcbind
    systemctl enable nfs
    

    挂载 (服务端和客户端最好都不要再挂在目录要不有可能挂在成功了,还是不好使)

    vi /etc/exports
    
    内容:
    /opt/data        192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)
    
    
    exportfs -rv
    
    mount -t nfs 192.168.1.22:/opt/data  /opt/data 
    

    卸载

    umount /opt/data 
    

    相关文章

      网友评论

          本文标题:搭建、挂载nfs及卸载

          本文链接:https://www.haomeiwen.com/subject/gxitiltx.html