2014-06-27 wcdj
先从官方的wiki开始。http://wiki.nginx.org/GettingStarted,了解下配置nginx编译选项的各个含义。
./configure --help 查看具体编译选项使用说明,然后写一个简单的安装脚本。
Nginx modules must be selected during compile, run-time selection of modules is not currently supported.
A full summary of the compile-time options, including optional modules, can be found in the provided configure script by running./configure --help
#!/bin/bash
echo "begin to install nginx-1.7.2"
echo "configure..."
./configure --prefix=/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2 \
--with-debug \
--with-pcre=/Users/gerryyang/LAMP/pcre/pcre-8.35 \
--with-openssl=/Users/gerryyang/LAMP/OpenSSL/openssl-1.0.1g
echo "make and make install..."
make && make install
指定后的配置和安装选项结果值如下:
Configuration summary
+ using PCRE library: /Users/gerryyang/LAMP/pcre/pcre-8.35
+ using OpenSSL library: /Users/gerryyang/LAMP/OpenSSL/openssl-1.0.1g
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
nginx path prefix: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2"
nginx binary file: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/sbin/nginx"
nginx configuration prefix: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/conf"
nginx configuration file: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/conf/nginx.conf"
nginx pid file: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/logs/nginx.pid"
nginx error log file: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/logs/error.log"
nginx http access log file: "/Users/gerryyang/LAMP/nginx/install/nginx-1.7.2/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"