第三方http網絡yum倉庫
1安裝http服務包
[root@centos7 ~]#yum -y install httpd httpd包有依賴性 使用yum安裝
[root@centos7 ~]#rpm -ql httpd
……
/usr/lib/systemd/system/httpd.service
……
/var/www/html
[root@centos7 ~]#systemctl start httpd.service
[root@centos7 ~]#systemctl enable httpd.service
[root@centos7 ~]#ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 5 192.168.122.1:53 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:631 *:*
LISTEN 0 128 :::80 :::* 80端口打開
LISTEN 0 32 :::21 :::*
LISTEN 0 128 :::22 :::*
[root@centos7 ~]#vim /var/www/html/index.html
[root@centos7 ~]#cat /var/www/html/index.html
<h1>hello,world</h1>
2準備第三方rpm相關包
[root@centos7 html]#mkdir app
[root@centos7 html]cd app
[root@centos7 app]#cp -rf /run/media/root/CentOS\ 7\ x86_64/Packages/* .
[root@centos7 app]#createrepo /var/www/html/app 在app下創建repodata元數據文件包
Spawning worker 0 with 683 pkgs
Spawning worker 1 with 683 pkgs
Spawning worker 2 with 683 pkgs
Spawning worker 3 with 682 pkgs
3搭建客戶端
[root@centos7 app]#vim /etc/yum.repos.d/html.repo
[centos-html]
name=repulic
baseurl=http://172.18.254.154/app 倉庫路徑為repodata的所在目錄
gpgcheck=0
第三方http網絡yum倉庫