当前位置:网站首页>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
边栏推荐
猜你喜欢

Understand the pointer in a picture

Basic concepts of software testing

The problem that tqdm cannot display in a single line

pycharm安装及导入项目注意事项

Unity shader overview

机器人导航

力扣每日一题 剑指 Offer II 091. 粉刷房子

遥感影像识别进展2022/5/5

What is the difference between single line and three line when renting servers in Hong Kong?

自动化部署项目
随机推荐
力扣题解 动态规划(5)
IP核小结
Solving binary tree with force deduction (8)
Linear progression for face recognition
wireshark图形界面介绍
链表回文判断
Socket long link
Pycharm installation and import project considerations
[song] rebirth of me in py introductory training (10): numpy
力扣 110. 平衡二叉树
力扣每日一题 剑指 Offer II 091. 粉刷房子
One of the usage of operator()
Code implementation and introduction of all commonly used sorting
遥感影像识别-训练策略
Chapter for software testing
多线程CAS、synchronized锁原理 、JUC以及死锁
C thread lock
如何区分独立服务器与VPS主机?
Pzk's first understanding of pointer in learning C language
ROS节点名称重名