按照httpd
yum install httpd -y
关闭防火墙
systemctl disable firewalld
systemctl stop firewalld
启动httpd
systemctl start httpd
systemctl enabled httpd
修改配置文件
vi /etc/httpd/conf.d/welcome.conf
(注释掉这些内容)
#<LocationMatch "^/+$">
# Options -Indexes
# ErrorDocument 403 /.noindex.html
#</LocationMatch>
#<Directory /usr/share/httpd/noindex>
# AllowOverride None
# Require all granted
#</Directory>
配置仓库
配置fstab文件
vi /etc/fstab
写入以下
/dev/sr0 /var/www/htnl iso9660 defaults 0 0
配置local.repo
vi /etc/yum.repos.d/local.repo
写入以下
[local]
name=local
baseurl=file:///var/www/html/
gpgcheck=0
enabled=1
重载
mount -a
yum repolist
重启httpd服务
systemctl restart httpd
给其他主机挂载
[local]
name=local
baseurl=http://192.168.13.4/
gpgcheck=0
enabled=1