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

相关推荐
vortex55 天前
反弹Shell场景中bash -c与直接bash -i的适用差异解析
c语言·chrome·bash
nono牛5 天前
30天Shell脚本编程实战(14天逆袭)
前端·chrome·bash
鸠摩智首席音效师6 天前
如何在 Bash 中循环遍历文件内容 ?
bash
ChrylZzz7 天前
bash和zsh
bash·shell·zsh
喵霓8 天前
mac系统的环境变量-bash_profile
开发语言·macos·bash
xuanloyer9 天前
linux基础学习--学习bash
linux·学习·bash
vortex510 天前
Windows 下 Git Bash 终端高效配置指南
windows·git·bash
vortex510 天前
Bash One-Liners 学习精要指南
开发语言·chrome·bash
蒋士峰DBA修行之路10 天前
红帽练习环境介绍
linux·开发语言·bash
张志翔的博客16 天前
如何在 macOS 上切换 Shell:从 Bash 到 Zsh 或其他 Shell
开发语言·macos·bash