Linux下源码编译安装Nginx

操作系统:Centos

下载源码包

http://nginx.org/en/download.html

解压

# tar -zxvf nginx-1.12.2.tar.gz 

编译安装

# cd nginx-1.12.2

指定安装路径及添加SSL模块功能

# ./configure --prefix=/usr/local/nginx --with-http_ssl_module

可能出现的问题:

    ./configure: error: the HTTP rewrite module requires the PCRE library.

    安装pcre-devel

 # yum install pcre-devel

    ./configure: error: SSL modules require the OpenSSL library.

    安装openssl-devel

# yum install openssl-devel

编译安装

# make && make install  

猜你喜欢

转载自blog.csdn.net/ifucking/article/details/79976437