nginx 1.4.2 安装笔记

顺便吐槽一下,有道笔记的排版太难用了,

啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊

============================================================================

测试nginx.conf文件配置语法是否错误:   /usr/local/nginx/sbin/nginx -t

fast shutdown:                        /usr/local/nginx/sbin/nginx -s stop

graceful shutdown:                    /usr/local/nginx/sbin/nginx -s quit

changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes:                            /usr/local/nginx/sbin/nginx -s reload

re-opening log files:                 /usr/local/nginx/sbin/nginx -s reopen

============================================================================

./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.

2013年8月3日 16:10:26

[root@AY121110111722e1c8917 nginx-1.4.2]# groupadd NginxGroup

[root@AY121110111722e1c8917 nginx-1.4.2]# useradd -g NginxGroup NginxUser

[root@AY121110111722e1c8917 src]# wget http://nginx.org/download/nginx-1.4.2.tar.gz

yum -y install gcc

./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.

[root@AY121110111722e1c8917 src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz

yum -y install gcc-c++

[root@AY121110111722e1c8917 pcre-8.33]# ./configure --enable-utf

./configure: error: the HTTP gzip module requires the zlib library.

You can either disable the module by using --without-http_gzip_module

option, or install the zlib library into the system, or build the zlib library

statically from the source with nginx by using --with-zlib=<path> option.

[root@AY121110111722e1c8917 src]# wget zlib.net/zlib-1.2.8.tar.gz

[root@AY121110111722e1c8917 src]# wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz

[root@AY121110111722e1c8917 nginx-1.4.2]# ./configure --with-openssl=/usr/bin/openssl

[root@AY121110111722e1c8917 nginx-1.4.2]# ./configure --user=NginxUser --group=NginxPwd --with-openssl=../pcre-8.33

Configuration summary

+ using system PCRE library

+ using OpenSSL library: ../pcre-8.33

+ using builtin md5 code

+ sha1 library is not found

+ using system zlib library

nginx path prefix: "/usr/local/nginx"

nginx binary file: "/usr/local/nginx/sbin/nginx"

nginx configuration prefix: "/usr/local/nginx/conf"

nginx configuration file: "/usr/local/nginx/conf/nginx.conf"

nginx pid file: "/usr/local/nginx/logs/nginx.pid"

nginx error log file: "/usr/local/nginx/logs/error.log"

nginx http access log file: "/usr/local/nginx/logs/access.log"

nginx http client request body temporary files: "client_body_temp"

nginx http proxy temporary files: "proxy_temp"

nginx http fastcgi temporary files: "fastcgi_temp"

nginx http uwsgi temporary files: "uwsgi_temp"

nginx http scgi temporary files: "scgi_temp"

修改文件:/usr/local/nginx/conf/nginx.conf

#user nobody;改为 user NginxUser NginxGroup;

location / {

root   /home/NginxUser/www/Mono/grj;

index  index.html index.htm;

}

nginx : error while loading shared libraries: libpcre.so.1 http://www.wiseg.net/?p=207

上一篇:GIT使用教程与基本原理


下一篇:Java注解教程及自定义注解