nginx安装
下载
下载地址
选择stable版本,下载的是.tar文件,执行
|
|
编译
|
|
一些问题
1.pcre问题
./configure: error: the HTTP rewrite module requires the PCRE library.
需要安装pcre
2.安装第三方模块http_substitutions_filter_module
github地址,不需要编译,参数- –add-module=/root/app/nginx-1.6.2/modules/ngx_ht\
tp_substitutions_filter_module 路径指定好就可以了
3.lc_all设置问题
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = “en_US:”,
LC_ALL = (unset),
LC_CTYPE = “zh_CN.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
需要设置LC_ALL=C
4.perl问题
/usr/bin/ld: cannot find -lperl
Linux下编译应用程序常常会出现如下错误:
/usr/bin/ld: cannot find -lxxx
意思是编译过程找不到对应库文件。其中,-lxxx表示链接库文件 libxxx.so。有时候,由于库文件是编译过程临时生成的,如果前面出错也会导致出现这种情况,下面针对的是由于本机系统环境缺失而引起的。
一般出现这种错误有以下几种原因:
系统缺乏对应的库文件;
版本不对应;
库文件的链接错误;
库文件路径设置问题;
对应第一第二种情况,可以通过下载安装lib来解决,ubuntu大多数可以直接通过apt-get来安装:
apt-get install libxxx-dev
所以执行
$apt-get install libperl-dev
安装pcre
http下载地址
下载完成后
|
|
安装完会打印pcre信息
|
|
执行make操作
|
|
pcre安装完成