Linux Distribution:Ubuntu 14
一,Nginx的安装
首先从Nginx的官网下载最新的稳定版本1.14.0:nginx:download
sean@ubuntu:~$ tar -xzf nginx-1.14.0.tar.gz
sean@ubuntu:~$ cd nginx-1.14.0/
sean@ubuntu:~/nginx-1.14.0$ sudo ./configure
......
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
配置时异常,提示HTTP的rewrite模块需要PCRE库,如果需要使用HTTP的rewrite功能,需要首先安装PCRE库,如果不需要该功能,也可使用--without-http_rewrite_module关闭该功能
PCRE库的下载地址:https://sourceforge.net/projects/pcre/files/pcre/8.42/pcre-8.42.tar.gz/download
sean@ubuntu:~$ tar -xzf pcre-8.42.tar.gz
sean@ubuntu:~$ cd pcre-8.42/
sean@ubuntu:~/pcre-8.42$ sudo ./configure
sean@ubuntu:~/pcre-8.42$ sudo make
sean@ubuntu:~/pcre-8.42$ sudo make install
PCRE安装完成之后继续Nginx的安装
sean@ubuntu:~/pcre-8.42$ cd ../nginx-1.14.0/
sea