标签:centos7 systemctl -o 安装 col star export bin 防火墙
一、服务器配置:yum -y install nfs-utils rpcbindvim  /etc/exports  #添加
/home/lee/nfs 192.168.8.*(rw,async,no_root_squash)chmod  -R  a+w  /home/lee/nfssystemctl  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  rpcbindshowmount  -e  192.168.8.81
mount  192.168.8.81:/home/lee/nfs  /home/lee/nfsb. 开机自动挂载:
echo  "192.168.8.81:/home/lee/nfs  /home/lee/nfs  nfs  defaults  0  0"  >>  /etc/fstab三、测试:
touch  /home/lee/nfs/test.txtll  /home/lee
标签:centos7 systemctl -o 安装 col star export bin 防火墙
原文地址:http://blog.51cto.com/12173069/2068815