zoukankan      html  css  js  c++  java
  • NFS服务器配置(UNIX/Linux操作系统之间文件共享)--Linux

    相关包:
    portmap-4.0-65.2.2.1
    nfs-utils-1.0.9-40.e15.i386.rpm
     
    相关守护进程:
    rpc.nfsd         //管理客户端能否登入服务器
    rpc.mountd    //对用户的权限验证
    portmap        //进行端口映射工作
     
    启动NFS:
    service  portmap  start
    service  nfs  start
     
    配置文件/etc/exports :
    例1:/tmp1   192.168.0.4/24(ro)  localhost(rw)  *(ro)
     //共享的目录   主机(权限)          
    注:主机的表达方式:192.168.0.3或192.168.0.0/24或192.168.0.0/255.255.255.0
       权限的表达方式:ro(只读) rw(读写) sync(同步)
     
    查看NFS服务器信息:
    showmount -e 192.168.0.3    //查看192.168.0.3服务器的所有共享目录
     
    挂载到客户端:
    mount -t NFS 192.168.0.3:/exports/rhe1  /mnt/nfs  //把NFS服务器下的/exports/rhe1共享目录挂载到本地/mnt/nfs目录下
     
    客户端开机自动挂载NFS:
    192.168.0.3:/exports/rhe1  /mnt/nfs  nfs  default 0 0   //添加此行到/etc/fstab 文件下
    mount -a           //然后重新加载fstab使生效即可
     
    NFS故障排除:
    在客户端执行:
    例2:rpcinfo -u 192.168.1.102 portmap    //IP地址均为NFS服务器地址
            rpcinfo -u 192.168.1.102 nfs
            rpcinfo -u 192.168.1.102 mountd
    例3:nfsstat -c
    在服务器端执行:
    例4:nfsstat -s
    NFS故障排除一般步骤:
    1、检查NFS客户端和服务端通信是否正常(ping)
    2、检查NFS服务器上NFS服务是否是正常运行了
    3、验证NFS服务器上/etc/exports文件是否有语法错误
    4、检查客户端NFS服务是否正常
    5、验证/etc/fstab 的配置是否正确
    本文为博主原创文章,知识共享,开源精神,转载注明出处。欢迎技术交流 QQ819509322
  • 相关阅读:
    Realtime crowdsourcing
    maven 常用插件汇总
    fctix
    sencha extjs4 command tools sdk
    首次吃了一颗带奶糖味的消炎药,不知道管用不
    spring mvc3 example
    ubuntu ati driver DO NOT INSTALL recommand driver
    yet another js editor on windows support extjs
    how to use springsource tools suite maven3 on command
    ocr service
  • 原文地址:https://www.cnblogs.com/kangvcar/p/5557116.html
Copyright © 2011-2022 走看看