Centos8创建局域网的私有yum源
2022/3/7 7:20:25
本文主要是介绍Centos8创建局域网的私有yum源,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
仓库服务器配置
[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
这篇关于Centos8创建局域网的私有yum源的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15在使用平台私钥进行解密时提示 "私钥解密失败" 错误信息是什么原因?-icode9专业技术文章分享
- 2024-11-15Layui框架有哪些方式引入?-icode9专业技术文章分享
- 2024-11-15Layui框架中有哪些减少对全局环境的污染方法?-icode9专业技术文章分享
- 2024-11-15laydate怎么关闭自动的日期格式校验功能?-icode9专业技术文章分享
- 2024-11-15laydate怎么取消初始日期校验?-icode9专业技术文章分享
- 2024-11-15SendGrid 的邮件发送时,怎么设置回复邮箱?-icode9专业技术文章分享
- 2024-11-15使用 SendGrid API 发送邮件后获取到唯一的请求 ID?-icode9专业技术文章分享
- 2024-11-15mailgun 发送邮件 tags标签最多有多少个?-icode9专业技术文章分享
- 2024-11-15mailgun 发送邮件 怎么批量发送给多个人?-icode9专业技术文章分享
- 2024-11-15如何搭建web开发环境并实现 web项目在浏览器中访问?-icode9专业技术文章分享