安装之前需要3个支持:gzip,pcre,openssl
【安装 Nginx】
模块依赖性
gzip 模块需要 zlib 库
rewrite 模块需要 pcre 库
ssl 功能需要 openssl 库
预先编译好的安装包
1 gzip支持,需要zlib http://www.zlib.net/ 下载最新版即可
2 rewrite module requires pcre library http://www.pcre.org/ 下载最新版即可
3 ssl 功能需要 openssl 库 http://www.openssl.org/ => http://www.openssl.org/source/ LASTEST版本即可
我在安装过程中遇到了两个问题:
1../configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
2../configure: error: the HTTP rewrite module requires the PCRE library.
第一个问题是需要安装openSSl,第二个需要安装pcre
安装过程:
1.安装编译openssl
tar zxvf openssl.tar.gz
cd openssl
./confbigure
make
make install
2.安装编译gzip
tar zxvf gzip.tar.gz
cd gzip
./confbigure
make
make install
3.安装编译pcre
tar zxvf pcre.tar.gz
cd pcre
./confbigure
make
make install
4.安装nginx
tar zxvf nginx.tar.gz
cd nginx
./configure --with-pcre=../pcre --with-zlib=../zlib --with-http_ssl_module --with-openssl=../openssl
make
make install
成功了。。。
nginx目前还不能直接支持php,必须先借助于fastcgi来驱动php。现在fastcgi较好的办法有2种,一个是spawn-fcgi,另外一个就是php-fpm,一般来说可能php-fpm更强大一点.
分享到:
相关推荐
ubuntu20.04无网dpkg安装nginx
Linux离线安装nginx安装包,附带安装教程,可以及时更新最新安装路径
centos7.6离线安装nginx
nginx作为一款服务器,在反向代理、负载均衡等方面具有优秀的性能,但是在深入学习之前需要先安装nginx。这里记录一下自己在centos7操作系统下安装nginx的过程,以便之后学习时查阅。笔者这里的Linux服务器使用的是...
Centos7.6.1810离线安装Nginx-所需依赖包 1、patch命令:patch-2.7.1-12.el7_7.x86_64.rpm 2、zlib-1.2.12.tar.gz 3、zlib-devel-1.2.7-20.el7_9.x86_64.rpm 4、pcre-8.32-17.el7.x86_64.rpm 5、pcre-devel-8.32-17....
ubuntu 20.04 离线安装Nginx(nginx-full_1.18.0)及相关依赖文件
非root下,离线安装nginx依赖加nginx安装包,需要先装gcc-c++
Linux离线安装Nginx资源包
linux下安装Nginx所需依赖包合集
国产化环境麒麟v10系统arm64下安装nginx所有依赖
Dockerfile 编译安装nginx FROM hub.c.163.com/netease_comb/centos:7 RUN yum install -y gcc gcc-c++ make openssl-devel pcre-devel #http://nginx.org/download/nginx-1.12.2.tar.gz ADD nginx-1.12.2....
该资源是在华为泰山服务器鲲鹏920cup中标麒麟操作系统上离线安装nginx所需的所有rpm包和nginx源码
centos7下在有网络和没网络的情况安装nginx;
yum 安装 Nginx 为懒人准备。 第三方yum源(CentOS默认的标准源里没有nginx软件包)
本人多年的工作经验,完善了一套linux安装nginx的全过程,有了这个文档,连小白用户都可以轻松安装了,不再需要依赖其他的安装文档了。文档还包括设置开机自启。
linux安装nginx并支持ssl,使得服务器支持证书签名,提升应用的安全性
通过RPM方式安装NGINX,需要升级openssl 安装命令:rpm -ivh openssl-libs-1.0.2k-25.el7_9.x86_64.rpm --force
此压缩包中存放着linux安装nginx所需要的安装包,按照链接的文档按顺序进行安装
linux操作系统下安装nginx步骤介绍在离线情况下安装nginx的步骤
docker离线安装nginx镜像