关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
关闭selinux
vim /etc/selinux/config
SELINUX=disabled
iso挂载
方法一
mkdir /media/Red7.3/
mount -t iso9660 -o loop rhel-server-7.3-x86_64-dvd.iso /media/Red7.3/
常规挂载
mount /dev/cdrom /media/Red7.3
安装httpd
yum install httpd* -y
编辑apache配置文件
cp -rf /etc/httpd/conf/httpd.conf httpd.conf.bak
删除测试启动服务
rm -rf /etc/httpd/conf.d/welcome.conf /var/www/error/noindex.html
拷贝文件到目录或者修改httpd.conf中的DocumentRoot
cp -rf /media/Red7.3 /var/www/html/
添加httpd主机名称
vim /etc/httpd/conf/httpd.conf
95 ServerName 192.168.31.204:80
赋予权限
chmod -R 755 /var/www/html/Red7.3
启动httpd服务
systemctl start httpd
设置httpd开机启动
systemctl enable httpd
==========================================================================================================
Red Hat 7.3客户端配置
touch /etc/yum.repos.d/rhel-media.repo
vi /etc/yum.repos.d/rhel-media.repo
[rhel-media]
name=Red Hat Enterprise Linux 7.3
baseurl=http://192.168.31.204/Red7.3
enabled=1
gpgcheck=0
gpgkey=http://192.168.31.204/Red7.3/RPM-GPG-KEY-redhat-release 或者注释不用
yum clean all 清除yum缓存
yum makecache 缓存本地yum源
yum list 测试
http://jbk.39.net/yiyuanzaixian/glnjyy/ |
http://jbk.39.net/yiyuanfengcai/yyjs_glnjyy/ |
http://jbk.39.net/yiyuanfengcai/ys_glnjyy/ |
http://jbk.39.net/yiyuanfengcai/tsyl_glnjyy/ |
http://jbk.39.net/yiyuanfengcai/zn_glnjyy/ |
http://jbk.39.net/yiyuanfengcai/hj_glnjyy/ |
http://jbk.39.net/yiyuanfengcai/lx_glnjyy/ |
http://jbk.39.net/yiyuanzaixian/ccykyy/ |
http://jbk.39.net/yiyuanfengcai/yyjs_ccykyy/ |
http://jbk.39.net/yiyuanfengcai/ys_ccykyy/ |
http://jbk.39.net/yiyuanfengcai/tsyl_ccykyy/ |
http://jbk.39.net/yiyuanfengcai/zn_ccykyy/ |
http://jbk.39.net/yiyuanfengcai/hj_ccykyy/ |
http://jbk.39.net/yiyuanfengcai/lx_ccykyy/ |