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

相关推荐
s_w.h9 小时前
【 linux 】文件系统
linux·运维·服务器·算法·bash
zh路西法18 小时前
【ROS一键编译脚本】基于colcon与catkin的辅助一键懒人脚本
linux·windows·bash
张小姐的猫18 小时前
【Linux】多线程实战 —— 日志类 | 策略模式
linux·运维·服务器·c++·bash·策略模式
i7i8i9com1 天前
Hermes Agent 安装记录
开发语言·bash·hermes
IMPYLH2 天前
Linux 的 yes 命令
linux·运维·服务器·数据库·bash
诸神缄默不语2 天前
Linux shell脚本教程
linux·bash·shell·sh
承渊政道3 天前
【MySQL数据库学习】(MySQL库的操作和表的操作)
数据库·学习·mysql·ubuntu·bash·数据库架构·数据库系统
IMPYLH3 天前
Linux 常用命令列表
linux·运维·服务器·bash
承渊政道4 天前
【MySQL数据库学习】(MySQL数据库基础)
数据库·学习·mysql·ubuntu·bash·数据库架构·数据库系统
IT大白鼠4 天前
Shell基础与Bash常用技巧:命令替换、重定向、管道、作业控制
bash