标签:centos7 systemctl -o 安装 col star export bin 防火墙
一、服务器配置:yum -y install nfs-utils rpcbind
vim /etc/exports #添加
/home/lee/nfs 192.168.8.*(rw,async,no_root_squash)
chmod -R a+w /home/lee/nfs
systemctl start rpcbind
systemctl start nfs
#rpcbind的端口
iptables -I INPUT -p udp --dport 111 -j ACCEPT
iptables -I INPUT -p tcp --dport 111 -j ACCEPT
#nfs的端口
iptables -I INPUT -p udp --dport 2049 -j ACCEPT
iptables -I INPUT -p tcp --dport 2049 -j ACCEPT
二、客户端配置:
yum -y install rpcbind
showmount -e 192.168.8.81
mount 192.168.8.81:/home/lee/nfs /home/lee/nfs
b. 开机自动挂载:
echo "192.168.8.81:/home/lee/nfs /home/lee/nfs nfs defaults 0 0" >> /etc/fstab
三、测试:
touch /home/lee/nfs/test.txt
ll /home/lee
标签:centos7 systemctl -o 安装 col star export bin 防火墙
原文地址:http://blog.51cto.com/12173069/2068815