1、yum库安装
[root@desktop0 ~]# cat /etc/yum.repos.d/rhel_dvd.repo
# Created by cloud-init on Thu, 10 Jul 2014 22:19:11 +0000[rhel_dvd]
gpgcheck = 0
enabled = 1
baseurl = http://content.example.com/rhel7.0/x86_64/dvd
name = Remote classroom copy of dvd
2、apache主机配置
[root@server0 ~]# cat /etc/httpd/conf.d/vhost.conf
<virtualhost *:80>
servername server0.example.com
documentroot /var/www/vhost/
</virtualhost>
<directory "/var/www/vhost">
require all granted
</directory>
3、导出nfs文件系统
[root@server0 ~]# cat /etc/exports.d/public.exports
/shares/public 172.25.0.0/24(rw,sync)
4、自动挂载nfs网络文件存储
[root@desktop0 ~]# cat /etc/auto.master.d/share.autofs
/shares /etc/auto.shares
[root@desktop0 ~]# cat /etc/auto.shares
* -rw,sync 172.25.0.11:/shares/&