yum离线包下载安装

离线rpm

yum install -y vim nano htop net-tools wget curl git traceroute mtr nmap tcpdump telnet nc tree psmisc procps-ng lsof lshw dmidecode lscpu lsblk lspci parted gdisk fdisk smartmontools ncdu zip unzip bzip2 xz gcc make cmake openssh-server openssh-clients chrony logrotate cronie yum-utils bash-completion tmux screen

tar -zcvf

1

Createrepo filepath

2

cat > "/etc/yum.repos.d/1".repo << EOF

offline

name=Offline Local Repository

baseurl=file://filepath

enabled=1

gpgcheck=0

priority=1

protect=0

metadata_expire=never

skip_if_unavailable=0

EOF

mkdir -p /etc/yum.repos.d/backup

4

.

mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ 2>/dev/null || true

mv "1.repo" /etc/yum.repos.d/

sudo yum clean all

sudo yum makecache

相关推荐
小肝一下6 天前
7. 库制作与原理
linux·c语言·操作系统·bash·shell·动静态库
德福危险7 天前
从目录枚举到bash破壳漏洞、从流量抓包到组权限提权:靶机练习之symfonos3
开发语言·bash
至乐活着12 天前
Shell脚本编写最佳实践:打造健壮、可维护的自动化利器
自动化·bash·shell·脚本·最佳实践
风向决定发型丶15 天前
Shell中的特殊变量
linux·运维·bash
tiana_17 天前
写了个零依赖的 Go 版本管理器,curl | bash 完事
开发语言·golang·bash
无足鸟ICT19 天前
【RHCA+】bash命令
linux·开发语言·bash
甄同学19 天前
第十七篇:Bash Executor命令执行器,安全运行Shell命令
开发语言·安全·bash
儒雅的名20 天前
GoF设计模式——策略模式
设计模式·bash·策略模式
hai31524754323 天前
九章空间几何对照直译法:通用芯片 / 定制专用芯片 编译适配规则
linux·汇编·bash
wok15723 天前
Git Bash 执行中文命令报错 127:MSYS 参数编码 bug 排查与修复
git·bug·bash