通过apache搭建自己的yum服务器。
1.安装运行httpd。
bash
yum install httpd -y
systemctl start httpd
systemctl enable httpd
systemctl status httpd

2.然后关掉selinux。
3.防火墙开放http服务。
bash
firewall-cmd --add-service=http --permanent
firewall-cmd --reload

4.浏览器输入服务器ip地址,验证服务是否开启。

5.apache web服务器标准的目录是/var/www/html,我们再此目录下创建子目录。
bash
mkdir /var/www/html/iso
6.将系统iso镜像中的文件复制一个目录中。
bash
mount -o loop CentOS-Stream-10-latest-x86_64-dvd1.iso /mnt
mkdir /centos-stream-10
cp -a /mnt/* /centos-stream-10/
7.创建软链接。
bash
ln -s /centos-stream-10 /var/www/html/iso
8.验证。
