当前位置:网站首页>Local yum source build
Local yum source build
2022-08-11 07:00:00 【zoujiangMr】
方案一:通过ISO镜像搭建yum源
1、下载镜像文件、
Mirror file official website link
2、安装nginx
yum install -y nginx
systemctl enable nginx --now
配置
vim /etc/nginx/nginx.conf
修改nginx.conf文件,新增autoindex on; ,然后重启nginx
nginx The default web page file path is :/usr/share/nginx/html,在这个目录下 新增一个文件夹,起名为centos7.下面我们会把isoImage files are mounted in this directory
3、挂载ISO镜像
挂载成功后,可以看到目录/usr/share/nginx/html/centos7/ 为iso镜像里面的内容.
# 挂载命令
[[email protected]_mtest ~]# mount -o loop /var/version/centos_rpm/CentOS-7-aarch64-Everything-2009.iso /usr/share/nginx/html/centos7/
[[email protected]_mtest ~]# ls /usr/share/nginx/html/centos7/
CentOS_BuildTag EFI EULA GPL images isolinux LiveOS Packages repodata RPM-GPG-KEY-CentOS-7 RPM-GPG-KEY-CentOS-Testing-7 TRANS.TBL
然后访问 http://IP/centos7/,You can see the contents of the image we just mounted
二、Others need to be configuredyumThe server operation of the source
4、编写local.repo文件
[[email protected] /etc/yum.repos.d]# pwd
/etc/yum.repos.d
[[email protected] /etc/yum.repos.d]# ls
bak local.repo
[[email protected] /etc/yum.repos.d]# cat local.repo
[base]
name=centos-7
baseurl=http://192.168.1.1/centos7/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[[email protected] /etc/yum.repos.d] #
5、清楚缓存/重新加载yum源
[[email protected] /root]# yum clean all
33 files removed
[[email protected] /root]# yum makecache
centos-7 66 MB/s | 10 MB 00:00
Last metadata expiration check: 0:00:01 ago on Fri 19 Nov 2021 03:58:19 PM CST.
Metadata cache created.
[[email protected] /root]# yum repolist
Last metadata expiration check: 0:00:12 ago on Fri 19 Nov 2021 03:58:19 PM CST.
repo id repo name status
base centos-7 10,070
[[email protected] /root]#
方案二:通过下载RPM包、自定义yum仓库
边栏推荐
- 无胁科技-TVD每日漏洞情报-2022-8-7
- 处理eking.Devos勒索病毒防范解密恢复操作攻略
- No threat of science and technology - TVD vulnerability information daily - 2022-7-21
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-8-2
- CLUSTER DAY04(块存储应用案例 、 分布式文件系统 、 对象存储)
- Apache Flink jobmanager/logs 目录穿越漏洞复现
- 无胁科技-TVD每日漏洞情报-2022-7-26
- C语言两百题(0基础持续更新)(1~5)
- SSL证书部署后,为什么还是显示不安全?
- 无胁科技-TVD每日漏洞情报-2022-8-1
猜你喜欢
随机推荐
无胁科技-TVD每日漏洞情报-2022-7-21
Vulnhub靶机--Chronos
No threat of science and technology - TVD vulnerability information daily - 2022-7-21
软件使用代码签名证书的好处和必要性
ETCD cluster fault emergency recovery - local data is available
MoreFileRename批量文件改名工具
Error in render: “TypeError: Cannot read properties of undefined (reading ‘commentsContent‘)“
网络安全学习小结--kali基本工具、webshell、代码审计
Project Notes - Take Notes
无胁科技-TVD每日漏洞情报-2022-7-30
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-8-6
HPC platform building
文本三剑客——sed 修改、替换
UML 类图之间的关系
AUTOMATION DAY07( Ansible Vault 、 普通用户使用ansible)
TCP 三次握手、四次断开
mysql 中登录报错:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)ERROR
(2) Software Testing Theory (*Key Use Case Method Writing)
ansible批量安装zabbix-agent
Login error in mysql: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)ERROR