标签:
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
标签:
原文地址:http://www.cnblogs.com/sflik/p/4409437.html