当前位置:网站首页>Three ways to get RPM packages using yum
Three ways to get RPM packages using yum
2022-07-27 06:18:00 【feike_ three】
Sometimes you need a package offline linux Installation on system , If you find the software package troublesome , Sure linux yum Download the required software package , The preparatory work is to find one that can connect to the Internet linux, And ready yum And yum Source , Generally, we use our vmware linux Virtual machine is OK .
There are two ways :
1、 commonly yum The tool comes with two parameters
--downloadonly don't update, just download // Only download
--downloaddir=DLDIR specifies an alternate directory to store packages // Download directory
The command format is as follows , For example, I want to download screen packet To /root Catalog
yum install --downloadonly --downloaddir=/root screen
Finished , Look at the following :
[[email protected] ~]# cd /root/
[[email protected] ~]# ll
total 568
-rw-r--r-- 1 root root 264 Dec 30 03:16 90-eno-fix.rules
-rw-------. 1 root root 958 May 22 2017 anaconda-ks.cfg
-rw-r--r-- 1 root root 565300 Apr 25 2018 screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm
Be careful : This method will download the dependent packages you need when installing the software package , Isn't this great .
2、 use rpm Package download tool :yumdownloader
install yumdownloader:
[[email protected] ~]# yum install yum-utils
download screen For example :
[[email protected] ~]# yumdownloader screen
The default download is in the current directory , Of course, you can also make a download directory , Also use "–downloaddir" Parameters
[[email protected] ~]# ll
total 572
-rw-------. 1 root root 958 May 18 2017 anaconda-ks.cfg
-rwxr-xr-x 1 root root 5 Feb 7 2018 kel.1.txt
-rw-r--r-- 1 root root 565300 Apr 25 2018 screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm
-rw-r--r-- 1 root root 932 Feb 5 2018 xxx.txt
[[email protected] ~]#
Be careful : This way will not download what you want rpm The dependency package of , Just download the software package given in your command
another , Actually you yum Install or update Software , You can choose to install or update The software package of is reserved for download ,yum The general default configuration of is deleted , This can be modified yum The configuration file , Let install or update Save the package after , The following two parameters :
[[email protected] yum.repos.d]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever // Save the directory
keepcache=0 //0 Do not save ,1 preservation
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
Last :
Then you can enter the download directory and pass rpm The installation instructions are installed
install rpm package :
Forced installation once : rpm -ivh --force --nodeps *.rpm
Re execution : rpm -ivh *.rpm
边栏推荐
- 力扣160. 相交链表
- 力扣每日一题leetcode 513. 找树左下角的值
- ROS工作空间覆盖
- Dynamic planning for solving problems (5)
- Brief introduction to unity menu interface
- C#文件的读写
- 1 semi automatic crawler
- Wireshark function introduction
- Pzk learns data types, binary conversion, input and output, operators, branch statements, ifelse of C language
- Li Kou 236. the nearest common ancestor of binary tree
猜你喜欢

一张图看懂指针

Unity practical tips (updating)

5g's past and present life -- a brief introduction to the development of mobile communication

Unity 引擎开始从 Mono 迁移到 .NET CoreCLR

socket 长链接

Pycharm installation and import project considerations

通信机制案例

The problem that tqdm cannot display in a single line

pycharm安装及导入项目注意事项
Calculation of Huffman tree, code implementation and proof, graphic interpretation
随机推荐
wireshark数据包修改--IP地址修改(一)
Dynamic planning for solving problems (6)
力扣题解 单调栈
切线空间以及TBN矩阵
Solve binary tree (6)
Code implementation and introduction of all commonly used sorting
遥感影像识别进展2022/5/5
ROS运行管理之launch文件
力扣题解 二叉树(6)
5g's past and present life -- a brief introduction to the development of mobile communication
机器人导航
多线程CAS、synchronized锁原理 、JUC以及死锁
wireshark功能介绍
力扣 110. 平衡二叉树
SQL初识
Unityshader Gaussian blur
Learning the operation environment needs to be equipped during software testing
力扣题解 动态规划(5)
[first song] machine learning of rebirth - linear regression
The principle of hash table and the solution of hash conflict