Blogger Information
Blog 28
fans 0
comment 0
visits 49193
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
软件实施-本地YUM源部署
益伦的博客
Original
1025 people have browsed it

思路、新建两个虚拟机,一个105挂载ISO,另一个106引用105的ISO
105是自己提前创建的虚机,前置工作做完后最好用桥接模式保证与内网服务器网段一致,保证离线实施的连通性

1、先在105上操作
2、安装httpd
yum install -y httpd
启动
systemctl start httpd
查看运行情况
ps -ef | grep httpd

3、在html中创建一个centos7文件夹,进行挂载
首先要么允许防火墙80端口访问或者关闭防火墙
firewall-cmd —add-service=http —permanent
systemctl stop firewalld
配置生效
firewall-cmd —reload

vm右下角手动连接小图标上连接源iso然后进行挂载
4、进行挂载,vm挂载的iso在dev/sr0中,实体机可以根目录新建一个文件夹上传/u01/CentOS-7-x86_64-DVD-1810.iso
vm
mount /dev/sr0 /var/www/html/centos7/
实体机
mount -o loop /u01/CentOS-6.7-x86_64-bin-DVD1.iso /mnt/dvd

挂载成功
卸载
umount /dev/sr0

umount /var/www/html/centos7/

5、selinux配置(尝试未关闭的情况下也没有拦截http服务,可能是把防火墙关闭了)
vim /etc/selinux/config
改配置
SELINUX=permissive
如果改为disabled,那要重启后关闭生效
如果改为permissive,相当于软关闭,不拦截只提醒

6、进入yum文件夹
cd /etc/yum.repos.d/

新建文件夹
mkdir bak
备份原始配置文件(移到bak)
mv *.repo bak
新建配置文件
vim local.repo
插入内容
[base]
name=CentOS-7
baseurl=file:///var/www/html/centos7
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

7、在106虚机上操作
进入yum文件夹
cd /etc/yum.repos.d/
新建文件夹
mkdir bak
备份原始配置文件(移到bak)
mv *.repo bak
新建配置文件
vi local.repo
插入内容
[base]
name=CentOS-7
baseurl=http://192.168.57.105/centos7
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KE-CentOS-7
试一下安装vim
yum install -y vim
成功!
vim local.repo

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post