康乐_SH

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

 

仓库服务器配置
[root@centos8-hkping ~]#yum -y install httpd
[root@centos8-hkping ~]#systemctl enable --now httpd
[root@centos8-hkping ~]#mkdir /var/www/html/centos/8 -pv
[root@centos8-hkping ~]#mount /dev/sr0 /mnt/
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@centos8-hkping ~]#cp -a /mnt/* /var/www/html/centos/8

 

下载阿里云的extras源,制作私有yum源
[root@repo-server ~]#dnf reposync --repoid=extras --download-metadata -p/var/www/html/centos 
[root@repo-server ~]#ls /var/www/html/centos/extras/ Packages repodata

下载阿里云的EPEL源,制作私有yum源

#下载相关仓库包和元数据
[root@centos8 ~]#dnf reposync --repoid=epel --download-metadata   -p/var/www/html
#下载相关的key文件
[root@repo-server ~]#wget -P /var/www/html/epel/https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-8
[root@centos8 ~]#ls /var/www/html/epel/
Packages repodata

yum客户端配置

[root@centos8-hkping /]#vim /etc/yum.repos.d/test.repo
[BaseOS]
name=BaseOS
baseurl=http://10.0.0.155/centos/8/BaseOS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[AppStream]
name=Appstream
baseurl=http://10.0.0.155/centos/8/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[extras]
name=extras
baseurl=http://10.0.0.155/centos/extras/
[epel]
name=epelbaseurl=http://10.0.0.155/epel/
gpgkey=http://10.0.0.8/epel/RPM-GPG-KEY-EPEL-8
[root@centos8-hkping /]#yum clean all && yum makecache
[root@centos8-hkping /]#yum repolist
仓库服务器配置
[root@centos8-hkping ~]#yum -y install httpd [root@centos8-hkping ~]#systemctl enable --now httpd [root@centos8-hkping ~]#mkdir /var/www/html/centos/8 -pv [root@centos8-hkping ~]#mount /dev/sr0 /mnt/ mount: /mnt: WARNING: device write-protected, mounted read-only. [root@centos8-hkping ~]#cp -a /mnt/* /var/www/html/centos/8
下载阿里云的extras源,制作私有yum源
[root@repo-server ~]#dnf reposync --repoid=extras --download-metadata -p/var/www/html/centos [root@repo-server ~]#ls /var/www/html/centos/extras/ Packages repodata
下载阿里云的EPEL源,制作私有yum源
#下载相关仓库包和元数据 [root@centos8 ~]#dnf reposync --repoid=epel --download-metadata   -p/var/www/html #下载相关的key文件 [root@repo-server ~]#wget -P /var/www/html/epel/https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-8 [root@centos8 ~]#ls /var/www/html/epel/ Packages repodata
yum客户端配置
[root@centos8-hkping /]#vim /etc/yum.repos.d/test.repo [BaseOS] name=BaseOS baseurl=http://10.0.0.155/centos/8/BaseOS gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial [AppStream] name=Appstream baseurl=http://10.0.0.155/centos/8/AppStream/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial [extras] name=extras baseurl=http://10.0.0.155/centos/extras/ [epel] name=epelbaseurl=http://10.0.0.155/epel/ gpgkey=http://10.0.0.8/epel/RPM-GPG-KEY-EPEL-8 [root@centos8-hkping /]#yum clean all && yum makecache [root@centos8-hkping /]#yum repolist
 

 

posted on 2022-03-06 09:12  康乐_SH  阅读(220)  评论(0编辑  收藏  举报