]# yum -y install httpd
]# yum -y install nfs-utils
]# showmount -e 192.168.4.30 //查看共享
]# echo “192.168.4.30://sitedir /var/www/html nfs defaults 0 0” >> /etc/fstab //配置开机挂载
]#mount -a
]# systemctl start httpd
]# systemctl enable remote-fs.target //设置远程加载服务开机运行 (延迟启动,开机先启动网络配置,再启动nfs挂载)
]# systemctl enable httpd
]# mount | grep “/var/www/html” //查看挂载信息
部署web网站服务,使得将共享目录挂在到网页根目录下
最新推荐文章于 2021-07-31 14:13:43 发布