当前位置:网站首页>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仓库
边栏推荐
猜你喜欢
随机推荐
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-30
实操指南:多个域名该买哪种SSL证书?
HPC platform building
VMware workstation 16 安装与配置
逐步揭示makop.mkp勒索病毒中毒防范恢复解密
升级到Window11体验
UML 类图之间的关系
2022年全国职业技能大赛网络安全竞赛试题B模块自己解析思路(4)
Basic use of Slurm
无胁科技-TVD每日漏洞情报-2022-7-31
企业怎样申请SSL证书?
内存调试工具Electric Fence
C语言两百题(0基础持续更新)(1~5)
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-19
mysql 中登录报错:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)ERROR
lvm 多盘挂载,合并使用
vulnhub靶机--6Day_Lab-v1.0.1
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-8-2
Jmeter RMI 反序列化命令执行漏洞复现
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-26