搭建yum私有仓库
系统初始化 关闭防火墙和策略:
1 systemctl disable --now firewalld
2 vim /etc/selinux/config
SELINUX=disabled
安装httpd服务:
下载 httpd服务
yum install httpd -y
启动httpd服务
systemctl enable --now httpd 启动后访问ip可以测试是否启动
Yum源路径创建及源下载:
mkdir /var/www/html/centos/8
dnf reposync --repoid=extras --download-metadata -p /var/www/html/centos
镜像挂载
上传镜像至/data文件下 并挂载到 /var/www/html/centos/8 路径
mount /data/CentOS-8.3.2011-x86_64-dvd1.iso /var/www/html/centos/8/
yum仓库配置
vim /etc/yum.repos.d/base.rpeo
[base]
name=base
baseurl=http://10.0.0.155/centos/8/BaseOS/
gpgcheck=0
[AppStream]
name=AppStream
baseurl=http://10.0.0.155/centos/8/AppStream/
gpgcheck=0
[extras]
name=extras
baseurl=http://10.0.0.155/centos/extras/
gpgcheck=0