ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

yum下载系统已经安装的rpm包

2022-06-17 14:33:07  阅读:161  来源: 互联网

标签:elrepo community repo yum mysql rpm 下载


下载系统已经安装的rpm包

下载系统已经安装的rpm包

yum -y install yum-utils #安装yum下载工具

yumdownloader mysql #用yum下载到当前目录

实例:

查询mysql安装包

[root@localhost ~]# rpm -qa | grep mysql
mysql-community-libs-5.6.28-2.el6.x86_64
mysql-community-server-5.6.28-2.el6.x86_64
mysql-community-client-5.6.28-2.el6.x86_64
mysql57-community-release-el6-7.noarch
mysql-community-common-5.6.28-2.el6.x86_64

安装工具

yum -y install yum-utils

下载rpm包

yumdownloader mysql-community-libs
yumdownloader mysql-community-server
yumdownloader mysql-community-client
yumdownloader mysql57-community-release
yumdownloader mysql-community-common

安装到其他服务器上

yum -y install localinstall ./*

下载最新内核

#添加yum源仓库
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo 
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

#更新yum源仓库
yum -y update

#查看可用的系统内核包
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

# 下载指定内核
yumdownloader kernel-lt-5.4.179       --enablerepo=elrepo-kernel

标签:elrepo,community,repo,yum,mysql,rpm,下载
来源: https://www.cnblogs.com/x602/p/16385582.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有