通過apache搭建自己的yum服務器。
1.安裝運行httpd。
yum install httpd -y
systemctl start httpd
systemctl enable httpd
systemctl status httpd
2.然後關掉selinux
3.防火牆開放http服務。
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
4.瀏覽器輸入服務器ip地址,驗證服務是否開啓。
5.apache web服務器標準的目錄是/var/www/html,我們再此目錄下創建子目錄。
mkdir /var/www/html/iso
6.將系統iso鏡像中的文件複製一個目錄中。
mount -o loop CentOS-Stream-10-latest-x86_64-dvd1.iso /mnt
mkdir /centos-stream-10
cp -a /mnt/* /centos-stream-10/
7.創建軟鏈接。
ln -s /centos-stream-10 /var/www/html/iso
8.驗證。