Linux——如何保存下载的软件包

简介: Linux——如何保存下载的软件包

前言

内网环境需要安装新版本工具

步骤

[root@wyy ~]# yum --help
Loaded plugins: fastestmirror
Usage: yum [options] COMMAND
List of Commands:
check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
fs             Acts on the filesystem data of the host, mainly for removing docs/lanuages for minimal hosts.
fssnapshot     Creates filesystem snapshots, or lists/deletes current snapshots.
groups         Display, or use, the groups information
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repo-pkgs      Treat a repo. as a group of packages, so we can install/remove all of them
repolist       Display the configured software repositories
search         Search package details for the given string
shell          Run an interactive yum shell
swap           Simple way to swap packages, instead of using shell
update         Update a package or packages on your system
update-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.
Options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C, --cacheonly       run entirely from system cache, don't update cache
  -c [config file], --config=[config file]
                        config file location
  -R [minutes], --randomwait=[minutes]
                        maximum command wait time
  -d [debug level], --debuglevel=[debug level]
                        debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e [error level], --errorlevel=[error level]
                        error output level
  --rpmverbosity=[debug level name]
                        debugging output level for rpm
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y, --assumeyes       answer yes for all questions
  --assumeno            answer no for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --disableincludes=[repo]
                        disable includepkgs for a repo or for everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
  --downloadonly        don't update, just download
  --downloaddir=DLDIR   specifies an alternate directory to store packages
  --setopt=SETOPTS      set arbitrary config and repo options
  --bugfix              Include bugfix relevant packages, in updates
  --security            Include security relevant packages, in updates
  --advisory=ADVS, --advisories=ADVS
                        Include packages needed to fix the given advisory, in
                        updates
  --bzs=BZS             Include packages needed to fix the given BZ, in
                        updates
  --cves=CVES           Include packages needed to fix the given CVE, in
                        updates
  --sec-severity=SEVS, --secseverity=SEVS
                        Include security relevant packages matching the
                        severity, in updates
  Plugin Options:

修改配置文件

# vi /etc/yum.conf
##缓存目录
cachedir=/var/cache/yum/$basearch/$releasever
##保持缓存
keepcache=1

查看下载的软件包

yum命令

##下载到指定目录并安装
# yum install -y --downloaddir=/app postgresql
##仅下载到指定目录不安装
yum install -y --downloaddir=/app --downloadonly nginx

学无止境,谦卑而行.

目录
相关文章
|
9天前
|
人工智能 Linux iOS开发
Linux下搭建本地deepseek(附文档下载)
本文介绍了在Linux上搭建本地DeepSeek的步骤。主要涉及安装ollama、下载deepseek模型(1.5b参数版本)和配置ChatboxAI客户端。通过命令行安装ollama后,使用`ollama run deepseek-r1:1.5b`下载模型,并配置环境变量以确保服务正常运行。最后,通过ChatboxAI与模型进行交互。整个过程适合初学者,服务器配置为4核CPU和8GB内存,无GPU,响应速度稍有延迟但可接受。相关资源链接已提供。
89 2
|
24天前
|
Linux API
Linux下载工具wget与curl
`wget` 是一个用于从网络下载文件的命令行工具,支持HTTP、HTTPS和FTP协议。它能自动处理下载中断,并支持递归下载网站内容。基本用法:`wget URL`,可指定文件名(`-O`)、保存目录(`-P`),还支持断点续传(`-c`)、限速(`--limit-rate`)和递归下载(`-r`)。相比之下,`curl` 更侧重于发送各种HTTP请求(如GET、POST),并支持文件上传、自定义请求头和cookie等功能。
57 10
|
21天前
|
存储 Ubuntu 前端开发
Linux软件包管理工具概览
在Linux系统中,dpkg、apt、rpm、yum和dnf是几种常见的包管理工具,它们分别属于不同的Linux发行版或家族,并有着各自的诞生顺序和特点。下面将按照这些工具的诞生顺序,并结合Debian、Red Hat、CentOS、Ubuntu和Kali等系统,进行详细的介绍。
25 4
|
5月前
|
算法 安全 Ubuntu
Linux下的软件包管理器有哪些
Linux下的软件包管理器有哪些
247 5
|
4月前
|
人工智能 Java 关系型数据库
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
205 4
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
|
5月前
|
Web App开发 监控 Linux
在Linux上,有许多软件可以下载和安装
在Linux上,有许多软件可以下载和安装
187 67
|
3月前
|
关系型数据库 MySQL Linux
MySQL数据库下载安装教程(Windows&Linux)
本文档详细介绍了MySQL的安装步骤,包括安装前的准备工作、下载安装包、Windows和Linux系统下的具体安装流程,以及如何配置MySQL服务、设置环境变量、启动服务和连接数据库等关键操作。
|
4月前
|
Linux 数据安全/隐私保护
适用于 Linux 的最佳命令行下载加速器
适用于 Linux 的最佳命令行下载加速器
127 3
|
6月前
|
安全 Unix Linux
Xshell和Xftp的下载和在linux虚拟机中的使用
这篇文章介绍了Xshell和Xftp的下载、安装和使用方法,包括如何在Linux虚拟机中使用它们进行远程连接和文件传输。
Xshell和Xftp的下载和在linux虚拟机中的使用
|
7月前
|
Linux
Linux 服务器下载百度网盘文件
本教程指导如何使用 `bypy` 库从百度网盘下载文件。首先通过 `pip install bypy` 安装库,接着运行 `bypy info` 获取登录链接并完成授权,最后将文件置于指定目录并通过 `bypy downdir /Ziya-13b-v1` 命令下载至本地。
625 1
Linux 服务器下载百度网盘文件