centos6.8离线安装nginx

rpm可从官网下载镜像解压获得,推荐从http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/下载

 

安装gcc

rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm

rpm -ivh cpp-4.4.7-23.el6.x86_64.rpm

rpm -ivh kernel-headers-2.6.32-754.el6.x86_64.rpm

出错示例:

去资源库下载=号前面的包,然后所有报错的一起安装

[root@localhost ~]# rpm -ivh glibc-2.12-1.212.el6.x86_64.rpm
error: Failed dependencies:
        glibc-common = 2.12-1.212.el6 is needed by glibc-2.12-1.212.el6.x86_64
[root@localhost ~]# ^C
[root@localhost ~]# rpm -ivh glibc-common-2.12-1.212.el6.x86_64.rpm
error: Failed dependencies:
        glibc = 2.12-1.212.el6 is needed by glibc-common-2.12-1.212.el6.x86_64
[root@localhost ~]# rpm -ivh glibc-2.12-1.212.el6.x86_64.rpm
error: Failed dependencies:
        glibc-common = 2.12-1.212.el6 is needed by glibc-2.12-1.212.el6.x86_64

rpm -ivh glibc-2.12-1.212.el6.x86_64.rpm glibc-common-2.12-1.212.el6.x86_64.rpm glibc-headers-2.12-1.212.el6.x86_64.rpm glibc-devel-2.12-1.212.el6.x86_64.rpm

 

安装pcre

rpm -ivh pcre-devel-7.8-7.el6.x86_64.rpm

 

安装zlib

rpm -ivh zlib-devel-1.2.3-3.x86_64.rpm

 

安装nginx

tar -zxvf nginx-1.14.0.tar.gz
cd nginx-1.14.0
./configure
make
make install

 

posted @ 2019-01-07 14:04  吃饭睡觉打逗逗  阅读(1427)  评论(0编辑  收藏  举报