linux 离线下载rpm安装包

下载依赖文件,离线安装

离线下载
### 下载到指定目录

$ sudo yum install <package-name> --downloadonly --downloaddir=/tmp 

redis依赖包

yum install gcc-c++ --downloadonly --downloaddir=/data/downloads/redis
yum install centos-release-scl --downloadonly --downloaddir=/data/downloads/redis
yum install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils --downloadonly --downloaddir=/data/downloads/redis

mysql依赖包
yum install perl perl-devel perl-Data-Dumper libaio-devel --downloadonly --downloaddir=/data/downloads/mysql

nginx依赖包
yum -y install gcc gcc-c++ kernel-devel --downloadonly --downloaddir=/data/downloads/nginx
yum -y install pcre-devel --downloadonly --downloaddir=/data/downloads/nginx
yum -y install openssl openssl-devel --downloadonly --downloaddir=/data/downloads/nginx


离线安装

# 因为部分rpm包互相依赖,只能用此方法安装。
rpm -ivh *.rpm --nodeps --force

linux 离线下载rpm安装包

上一篇:linux隐藏你的crontab后门


下一篇:比较文件命令之diff,patch,vimdiff,cmp