CentOS7 离线安装gcc/pcre-devel/openssl-devel/zlib-devel

安装Nginx时,发现系统没有装各种依赖库,基本上是gcc、pre-devel、openssl-devel、zlib-devel,Linux又是内网环境,并不能用yum install来进行安装,这里就提供一种离线安装方式。

1、首先查看Linux 的系统版本号

cat /etc/redhat-release

CentOS7 离线安装gcc/pcre-devel/openssl-devel/zlib-devel_第1张图片

2、下载相应版本的镜像文件

下载地址:http://vault.centos.org/7.2.1511/isos/x86_64/

把7.2.1511改成你的相对版本号,我这里选择种子文件下载,速度还可以。

CentOS7 离线安装gcc/pcre-devel/openssl-devel/zlib-devel_第2张图片

 

3、解压CentOS7操作系统安装镜像,进入到CentOS-7.2-1511-x86_64-DVD\Packages目录,这下面存储了很多rpm包。

4、找到下面列出的rpm包,上传到CentOS机器任意位置。

autogen-libopts-5.18-5.el7.x86_64.rpm
cpp-4.8.2-16.el7.x86_64.rpm
gcc-4.8.2-16.el7.x86_64.rpm
glibc-devel-2.17-55.el7.x86_64.rpm
glibc-headers-2.17-55.el7.x86_64.rpm
kernel-headers-3.10.0-123.el7.x86_64.rpm
keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm
krb5-devel-1.11.3-49.el7.x86_64.rpm
libcom_err-devel-1.42.9-4.el7.x86_64.rpm
libmpc-1.0.1-3.el7.x86_64.rpm
libselinux-devel-2.2.2-6.el7.x86_64.rpm
libsepol-devel-2.1.9-3.el7.x86_64.rpm
libverto-devel-0.2.5-4.el7.x86_64.rpm
mpfr-3.1.1-4.el7.x86_64.rpm
ntp-4.2.6p5-18.el7.centos.x86_64.rpm
ntpdate-4.2.6p5-18.el7.centos.x86_64.rpm
openssl098e-0.9.8e-29.el7.centos.x86_64.rpm
openssl-1.0.1e-34.el7.x86_64.rpm
openssl-devel-1.0.1e-34.el7.x86_64.rpm
openssl-libs-1.0.1e-34.el7.x86_64.rpm
pcre-devel-8.32-12.el7.x86_64.rpm
pkgconfig-0.27.1-4.el7.x86_64.rpm
tcl-8.5.13-4.el7.x86_64.rpm
zlib-1.2.7-13.el7.x86_64.rpm
zlib-devel-1.2.7-13.el7.x86_64.rpm

5、执行如下命令,等待安装完成:

rpm -Uvh ./*.rpm --nodeps --force

 

 

 

 

 

 

 

你可能感兴趣的:(Linux)