DNS共享

1、首先需要三台服务器,记住防火墙一定要关闭
在这里插入图片描述
2、web1安装nfs-utils,rpcbind

yum  -y install nfs-utils rpcbind httpd
chkconfig nfs on
chkconfig rpcbind on

/var/www/html 192.168.11.0/24(rw,sync,no_root_squash)
4、启动NFS服务,rpcbind必须在nfs前启动:

service rpcbind start
service nfs start
netstat -anpt | grep rpcbind

查看本机NFS共享目录

showmount -e

5、在web2,web3安装部署客户机端:

yum  -y install rpcbind nfs-utils httpd
chkconfig rpcbind on
service rpcbind start

6、web2,web3手动挂载NFS共享目录

mount 192.168.11.128:/var/www/html  /var/www/html/

7、查看挂载结果,并测试

tail  -1 /etc/mtab

在这里插入图片描述
转到web1

touch /var/www/html/11

查看web2,web3是否都有

ll /var/www/html/

在这里插入图片描述


版权声明:本文为weixin_45697341原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。