1. 安装
# yum install nfs* -y
2. 设置服务
# service rpcbind start
# chkconfig rpcbind on
# service nfs start
# chkconfig nfs on
3. 修改配置文件
# vi /etc/exports
编辑文件,加入下面行
/home/lbl/all 10.81.230.0/24(rw,sync,no_root_squash,no_all_squash)
4. 修改文件权限
# chmod 777 -R /home/lbl/all
5. 配置iptables
# vi /etc/sysconfig/iptables
编辑文件,在“REJECT”前面插入下面几行
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 32803 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 892 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 875 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 662 -j ACCEPT
6. 重启服务
# service iptables restart
# service nfs restart
7. 配置完成,在另一台PC上验证mount是否成功
# mount -t nfs 10.81.230.204:/home/lbl/all /root/LBL/nfs/
# cd /root/LBL/nfs/
# ls
原文:http://www.cnblogs.com/liboli/p/5032252.html