zoukankan      html  css  js  c++  java
  • nfs配置

    1. 检查是否已安装NFS

    rpm -qa | grep nfs
    rpm -qa | grep portmap

    2. 安装NFS

    yum install nfs-utils*
    chkconfig nfs on
    chkconfig rpcbind on
    service nfs restart
    service rpcbind restart
    service nfs status
    service rpcbind status

    3. 配置防火墙

    cd /etc/sysconfig
    cp nfs nfs.bak
    vim nfs
    
    RQUOTAD_PORT=875 
    LOCKD_TCPPORT=32803 
    LOCKD_UDPPORT=32769
    MOUNTD_PORT=892
    
    echo "mountd 892/tcp" >> /etc/services
    echo "mountd 892/udp" >> /etcservices
    echo "rquotad 875/tcp" >> /etc/services
    echo "rquotad 875/udp" >> /etc/services
    echo "nlockmgr 32803/tcp" >> /etc/services
    echo "nlockmgr 32769/udp" >> /etc/services
    
    service nfs restart
    
    iptables -A INPUT -p tcp --dport 111 -j ACCEPT
    iptables -A INPUT -p udp --dport 111 -j ACCEPT
    iptables -A INPUT -p tcp --dport 892 -j ACCEPT
    iptables -A INPUT -p udp --dport 892 -j ACCEPT
    iptables -A INPUT -p tcp --dport 875 -j ACCEPT
    iptables -A INPUT -p udp --dport 875 -j ACCEPT
    iptables -A INPUT -p tcp --dport 2049 -j ACCEPT
    iptables -A INPUT -p udp --dport 2049 -j ACCEPT
    iptables -A INPUT -p tcp --dport 32803 -j ACCEPT
    iptables -A INPUT -p udp --dport 32803 -j ACCEPT
    iptables -A INPUT -p tcp --dport 32769 -j ACCEPT
    iptables -A INPUT -p udp --dport 32769 -j ACCEPT
    
    service iptables save

    4. 配置NFS

    vim /etc/exports
    
    /nfs *(insecure,rw,async,no_root_squash) *(ro)

    5. 挂载测试

    showmount -e 10.166.80.15

     移除挂载目录

    umount 挂载目录
    例:umount /upload

    挂载

    mount  nfs主机名:nfs共享目录     挂载到本机的目录
  • 相关阅读:
    Gym101630A Archery Tournament
    BZOJ2588 Count on a tree
    Redis主从复制
    Redis事务
    Redis持久化RDB和AOF
    设计模式之代理模式
    Spring AOP(面向切面编程)
    基于TCP和UDP的Socket通信
    Ajax无法访问回调函数seccess问题
    SpringBoot Ajax跨域问题(session共享问题)
  • 原文地址:https://www.cnblogs.com/sflik/p/4409437.html
Copyright © 2011-2022 走看看