本文主要记录自己在“从Nginx源码构建、编译并安装”过程中遇到的一些问题及详细步骤,通过以下方式构建的Nginx集成了 SSL、Lua、Nginx Upstream Health Check、解压缩 功能。
# 1. 下载安装包(http://nginx.org/en/download.html)
wget http://nginx.org/download/nginx-1.7.10.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
wget http://openssl.org/source/openssl-1.0.2a.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz -O ngx_devel_kit-0.2.19.tar.gz
wget https://github.com/openresty/lua-nginx-module/archive/v0.9.15.tar.gz -O lua-nginx-module-0.9.15.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
wget http://openssl.org/source/openssl-1.0.2a.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz -O ngx_devel_kit-0.2.19.tar.gz
wget https://github.com/openresty/lua-nginx-module/archive/v0.9.15.tar.gz -O lua-nginx-module-0.9.15.tar.gz
wget https://github.com/openresty/lua-upstream-nginx-module/archive/v0.02.tar.gz -O lua-upstream-nginx-module-0.02.tar.gz
# 2. 解压缩安装包,并创建“软链接”
tar -xzvf nginx-1.7.10.tar.gz
tar -xzvf nginx-1.7.10.tar.gz
tar -xzvf pcre-8.36.tar.gz
mv pcre-8.36 nginx-1.7.10
tar -xzvf openssl-1.0.2a.tar.gz
mv openssl-1.0.2a nginx-1.7.10
tar -xzvf zlib-1.2.8.tar.gz
mv zlib-1.2.8 nginx-1.7.10
tar -xzvf ngx_devel_kit-0.2.19.tar.gz
mv ngx_devel_kit-0.2.19 nginx-1.7.10
tar -xzvf lua-nginx-module-0.9.15.tar.gz
mv lua-nginx-module-0.9.15 nginx-1.7.10
mv pcre-8.36 nginx-1.7.10
tar -xzvf openssl-1.0.2a.tar.gz
mv openssl-1.0.2a nginx-1.7.10
tar -xzvf zlib-1.2.8.tar.gz
mv zlib-1.2.8 nginx-1.7.10
tar -xzvf ngx_devel_kit-0.2.19.tar.gz
mv ngx_devel_kit-0.2.19 nginx-1.7.10
tar -xzvf lua-nginx-module-0.9.15.tar.gz
mv lua-nginx-module-0.9.15 nginx-1.7.10
tar -xzvf lua-upstream-nginx-module-0.02.tar.gz
mv lua-upstream-nginx-module-0.02 nginx-1.7.10
mv nginx-1.7.10 /usr/apps/nginx-1.7.10
mv lua-upstream-nginx-module-0.02 nginx-1.7.10
mv nginx-1.7.10 /usr/apps/nginx-1.7.10
cd /usr/apps
ln -s nginx-1.7.10 nginx
cd nginx
ln -s nginx-1.7.10 nginx
cd nginx
# 3. 修改Nginx的openssl编译配置信息并编译OpenSSL
# 3.1 修改 nginx/auto/lib/openssl/conf
# CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
# CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
# CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
# CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
# CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
# CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
# CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
CORE_INCS="$CORE_INCS $OPENSSL/include"
CORE_DEPS="$CORE_DEPS $OPENSSL/include/openssl/ssl.h"
CORE_LIBS="$CORE_LIBS $OPENSSL/libssl.a"
CORE_LIBS="$CORE_LIBS $OPENSSL/libcrypto.a"
# 3.2 编译并构建OpenSSL
cd openssl-1.0.2a/
./config
make
make
cd ..
【问题】
1. make[1]: *** [/apps/lib/openssl-1.0.2a/.openssl/include/openssl/ssl.h] Error 2
2. cc: error: openssl-1.0.2a/libssl.a: 未找到相关文件或目录、cc: error: openssl-1.0.2a/libcrypto.a: 未找到相关文件或目录
原因是没有先对OpenSSL进行编译构建,需要先构建生成这两个包。
# 4. build(构建)
./configure --prefix=/usr/apps/nginx \
--with-ld-opt="-Wl,-rpath,$LUAJIT_LIB" \
--with-ld-opt="-Wl,-rpath,$LUAJIT_LIB" \
--with-http_ssl_module \
--with-pcre=pcre-8.36 \
--with-openssl=openssl-1.0.2a \
--with-zlib=zlib-1.2.8 \
--add-module=ngx_devel_kit-0.2.19 \
--add-module=lua-nginx-module-0.9.15 \
--add-module=lua-upstream-nginx-module-0.02
--with-openssl=openssl-1.0.2a \
--with-zlib=zlib-1.2.8 \
--add-module=ngx_devel_kit-0.2.19 \
--add-module=lua-nginx-module-0.9.15 \
--add-module=lua-upstream-nginx-module-0.02
==== 构建日志 ====
checking for OS
+ Linux 3.13.0-24-generic x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
...
configuring additional modules
adding module in ngx_devel_kit-0.2.19
+ ngx_devel_kit was configured
adding module in lua-nginx-module-0.9.15
checking for LuaJIT library in /usr/apps/luajit/lib and /usr/apps/luajit/include/luajit-2.0 (specified by the LUAJIT_LIB and LUAJIT_INC env) ... found
checking for export symbols by default (-E) ... found
checking for export symbols by default (--export-all-symbols) ... not found
checking for SO_PASSCRED ... found
+ ngx_http_lua_module was configured
checking for OS
+ Linux 3.13.0-24-generic x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
...
configuring additional modules
adding module in ngx_devel_kit-0.2.19
+ ngx_devel_kit was configured
adding module in lua-nginx-module-0.9.15
checking for LuaJIT library in /usr/apps/luajit/lib and /usr/apps/luajit/include/luajit-2.0 (specified by the LUAJIT_LIB and LUAJIT_INC env) ... found
checking for export symbols by default (-E) ... found
checking for export symbols by default (--export-all-symbols) ... not found
checking for SO_PASSCRED ... found
+ ngx_http_lua_module was configured
adding module in lua-upstream-nginx-module-0.02
+ ngx_http_lua_upstream_module was configured
creating objs/Makefile
Configuration summary (配置摘要)
+ ngx_http_lua_upstream_module was configured
creating objs/Makefile
Configuration summary (配置摘要)
+ using PCRE library: pcre-8.36
+ using OpenSSL library: openssl-1.0.2a
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using zlib library: zlib-1.2.8
nginx path prefix: "/usr/apps/nginx"
nginx binary file: "/usr/apps/nginx/sbin/nginx"
nginx configuration prefix: "/usr/apps/nginx/conf"
nginx configuration file: "/usr/apps/nginx/conf/nginx.conf"
nginx pid file: "/usr/apps/nginx/logs/nginx.pid"
nginx error log file: "/usr/apps/nginx/logs/error.log"
nginx http access log file: "/usr/apps/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"
+ using OpenSSL library: openssl-1.0.2a
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using zlib library: zlib-1.2.8
nginx path prefix: "/usr/apps/nginx"
nginx binary file: "/usr/apps/nginx/sbin/nginx"
nginx configuration prefix: "/usr/apps/nginx/conf"
nginx configuration file: "/usr/apps/nginx/conf/nginx.conf"
nginx pid file: "/usr/apps/nginx/logs/nginx.pid"
nginx error log file: "/usr/apps/nginx/logs/error.log"
nginx http access log file: "/usr/apps/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"
# 5. make(编译)
make -j2
make -j2
==== 编译日志 ====
...
cc -o objs/nginx \
objs/src/core/nginx.o \
objs/src/core/ngx_log.o \
objs/src/core/ngx_palloc.o \
objs/src/core/ngx_array.o \
objs/src/core/ngx_list.o \
objs/src/core/ngx_hash.o \
objs/src/core/ngx_buf.o \
objs/src/core/ngx_queue.o \
objs/src/core/ngx_output_chain.o \
objs/src/core/ngx_string.o \
objs/src/core/ngx_parse.o \
objs/src/core/ngx_inet.o \
objs/src/core/ngx_file.o \
objs/src/core/ngx_crc32.o \
objs/src/core/ngx_murmurhash.o \
objs/src/core/ngx_md5.o \
objs/src/core/ngx_rbtree.o \
objs/src/core/ngx_radix_tree.o \
objs/src/core/ngx_slab.o \
objs/src/core/ngx_times.o \
objs/src/core/ngx_shmtx.o \
objs/src/core/ngx_connection.o \
objs/src/core/ngx_cycle.o \
objs/src/core/ngx_spinlock.o \
objs/src/core/ngx_cpuinfo.o \
objs/src/core/ngx_conf_file.o \
objs/src/core/ngx_resolver.o \
objs/src/core/ngx_open_file_cache.o \
objs/src/core/ngx_crypt.o \
objs/src/core/ngx_proxy_protocol.o \
objs/src/core/ngx_syslog.o \
objs/src/event/ngx_event.o \
objs/src/event/ngx_event_timer.o \
objs/src/event/ngx_event_posted.o \
objs/src/event/ngx_event_busy_lock.o \
objs/src/event/ngx_event_accept.o \
objs/src/event/ngx_event_connect.o \
objs/src/event/ngx_event_pipe.o \
objs/src/os/unix/ngx_time.o \
objs/src/os/unix/ngx_errno.o \
objs/src/os/unix/ngx_alloc.o \
objs/src/os/unix/ngx_files.o \
objs/src/os/unix/ngx_socket.o \
objs/src/os/unix/ngx_recv.o \
objs/src/os/unix/ngx_readv_chain.o \
objs/src/os/unix/ngx_udp_recv.o \
objs/src/os/unix/ngx_send.o \
objs/src/os/unix/ngx_writev_chain.o \
objs/src/os/unix/ngx_channel.o \
objs/src/os/unix/ngx_shmem.o \
objs/src/os/unix/ngx_process.o \
objs/src/os/unix/ngx_daemon.o \
objs/src/os/unix/ngx_setaffinity.o \
objs/src/os/unix/ngx_setproctitle.o \
objs/src/os/unix/ngx_posix_init.o \
objs/src/os/unix/ngx_user.o \
objs/src/os/unix/ngx_process_cycle.o \
objs/src/os/unix/ngx_linux_init.o \
objs/src/event/modules/ngx_epoll_module.o \
objs/src/os/unix/ngx_linux_sendfile_chain.o \
objs/src/core/ngx_regex.o \
objs/src/http/ngx_http.o \
objs/src/http/ngx_http_core_module.o \
objs/src/http/ngx_http_special_response.o \
objs/src/http/ngx_http_request.o \
objs/src/http/ngx_http_parse.o \
objs/src/http/ngx_http_header_filter_module.o \
objs/src/http/ngx_http_write_filter_module.o \
objs/src/http/ngx_http_copy_filter_module.o \
objs/src/http/modules/ngx_http_log_module.o \
objs/src/http/ngx_http_request_body.o \
objs/src/http/ngx_http_variables.o \
objs/src/http/ngx_http_script.o \
objs/src/http/ngx_http_upstream.o \
objs/src/http/ngx_http_upstream_round_robin.o \
objs/src/http/ngx_http_parse_time.o \
objs/src/http/modules/ngx_http_static_module.o \
objs/src/http/modules/ngx_http_index_module.o \
objs/src/http/modules/ngx_http_chunked_filter_module.o \
objs/src/http/modules/ngx_http_range_filter_module.o \
objs/src/http/modules/ngx_http_headers_filter_module.o \
objs/src/http/modules/ngx_http_not_modified_filter_module.o \
objs/src/http/ngx_http_busy_lock.o \
objs/src/http/ngx_http_file_cache.o \
objs/src/http/modules/ngx_http_gzip_filter_module.o \
objs/src/http/ngx_http_postpone_filter_module.o \
objs/src/http/modules/ngx_http_ssi_filter_module.o \
objs/src/http/modules/ngx_http_charset_filter_module.o \
objs/src/http/modules/ngx_http_userid_filter_module.o \
objs/src/http/modules/ngx_http_autoindex_module.o \
objs/src/http/modules/ngx_http_auth_basic_module.o \
objs/src/http/modules/ngx_http_access_module.o \
objs/src/http/modules/ngx_http_limit_conn_module.o \
objs/src/http/modules/ngx_http_limit_req_module.o \
objs/src/http/modules/ngx_http_geo_module.o \
objs/src/http/modules/ngx_http_map_module.o \
objs/src/http/modules/ngx_http_split_clients_module.o \
objs/src/http/modules/ngx_http_referer_module.o \
objs/src/http/modules/ngx_http_rewrite_module.o \
objs/src/http/modules/ngx_http_proxy_module.o \
objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/addon/src/ndk.o \
objs/addon/src/ngx_http_lua_script.o \
objs/addon/src/ngx_http_lua_log.o \
objs/addon/src/ngx_http_lua_subrequest.o \
objs/addon/src/ngx_http_lua_ndk.o \
objs/addon/src/ngx_http_lua_control.o \
objs/addon/src/ngx_http_lua_time.o \
objs/addon/src/ngx_http_lua_misc.o \
objs/addon/src/ngx_http_lua_variable.o \
objs/addon/src/ngx_http_lua_string.o \
objs/addon/src/ngx_http_lua_output.o \
objs/addon/src/ngx_http_lua_headers.o \
objs/addon/src/ngx_http_lua_req_body.o \
objs/addon/src/ngx_http_lua_uri.o \
objs/addon/src/ngx_http_lua_args.o \
objs/addon/src/ngx_http_lua_ctx.o \
objs/addon/src/ngx_http_lua_regex.o \
objs/addon/src/ngx_http_lua_module.o \
objs/addon/src/ngx_http_lua_headers_out.o \
objs/addon/src/ngx_http_lua_headers_in.o \
objs/addon/src/ngx_http_lua_directive.o \
objs/addon/src/ngx_http_lua_consts.o \
objs/addon/src/ngx_http_lua_exception.o \
objs/addon/src/ngx_http_lua_util.o \
objs/addon/src/ngx_http_lua_cache.o \
objs/addon/src/ngx_http_lua_contentby.o \
objs/addon/src/ngx_http_lua_rewriteby.o \
objs/addon/src/ngx_http_lua_accessby.o \
objs/addon/src/ngx_http_lua_setby.o \
objs/addon/src/ngx_http_lua_capturefilter.o \
objs/addon/src/ngx_http_lua_clfactory.o \
objs/addon/src/ngx_http_lua_pcrefix.o \
objs/addon/src/ngx_http_lua_headerfilterby.o \
objs/addon/src/ngx_http_lua_shdict.o \
objs/addon/src/ngx_http_lua_socket_tcp.o \
objs/addon/src/ngx_http_lua_api.o \
objs/addon/src/ngx_http_lua_logby.o \
objs/addon/src/ngx_http_lua_sleep.o \
objs/addon/src/ngx_http_lua_coroutine.o \
objs/addon/src/ngx_http_lua_bodyfilterby.o \
objs/addon/src/ngx_http_lua_initby.o \
objs/addon/src/ngx_http_lua_initworkerby.o \
objs/addon/src/ngx_http_lua_socket_udp.o \
objs/addon/src/ngx_http_lua_req_method.o \
objs/addon/src/ngx_http_lua_phase.o \
objs/addon/src/ngx_http_lua_uthread.o \
objs/addon/src/ngx_http_lua_timer.o \
objs/addon/src/ngx_http_lua_config.o \
objs/addon/src/ngx_http_lua_worker.o \
objs/ngx_modules.o \
-Wl,-rpath,/usr/apps/luajit/lib -Wl,-E -lpthread -lcrypt -L/usr/apps/luajit/lib -lluajit-5.1 -lm pcre-8.36/.libs/libpcre.a zlib-1.2.8/libz.a
make[1]:正在离开目录 `/usr/apps/nginx-1.7.10'
make -f objs/Makefile manpage
make[1]: 正在进入目录 `/usr/apps/nginx-1.7.10'
sed -e "s|%%PREFIX%%|/usr/apps/nginx|" \
-e "s|%%PID_PATH%%|/usr/apps/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/usr/apps/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/usr/apps/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]:正在离开目录 `/usr/apps/nginx-1.7.10'
...
cc -o objs/nginx \
objs/src/core/nginx.o \
objs/src/core/ngx_log.o \
objs/src/core/ngx_palloc.o \
objs/src/core/ngx_array.o \
objs/src/core/ngx_list.o \
objs/src/core/ngx_hash.o \
objs/src/core/ngx_buf.o \
objs/src/core/ngx_queue.o \
objs/src/core/ngx_output_chain.o \
objs/src/core/ngx_string.o \
objs/src/core/ngx_parse.o \
objs/src/core/ngx_inet.o \
objs/src/core/ngx_file.o \
objs/src/core/ngx_crc32.o \
objs/src/core/ngx_murmurhash.o \
objs/src/core/ngx_md5.o \
objs/src/core/ngx_rbtree.o \
objs/src/core/ngx_radix_tree.o \
objs/src/core/ngx_slab.o \
objs/src/core/ngx_times.o \
objs/src/core/ngx_shmtx.o \
objs/src/core/ngx_connection.o \
objs/src/core/ngx_cycle.o \
objs/src/core/ngx_spinlock.o \
objs/src/core/ngx_cpuinfo.o \
objs/src/core/ngx_conf_file.o \
objs/src/core/ngx_resolver.o \
objs/src/core/ngx_open_file_cache.o \
objs/src/core/ngx_crypt.o \
objs/src/core/ngx_proxy_protocol.o \
objs/src/core/ngx_syslog.o \
objs/src/event/ngx_event.o \
objs/src/event/ngx_event_timer.o \
objs/src/event/ngx_event_posted.o \
objs/src/event/ngx_event_busy_lock.o \
objs/src/event/ngx_event_accept.o \
objs/src/event/ngx_event_connect.o \
objs/src/event/ngx_event_pipe.o \
objs/src/os/unix/ngx_time.o \
objs/src/os/unix/ngx_errno.o \
objs/src/os/unix/ngx_alloc.o \
objs/src/os/unix/ngx_files.o \
objs/src/os/unix/ngx_socket.o \
objs/src/os/unix/ngx_recv.o \
objs/src/os/unix/ngx_readv_chain.o \
objs/src/os/unix/ngx_udp_recv.o \
objs/src/os/unix/ngx_send.o \
objs/src/os/unix/ngx_writev_chain.o \
objs/src/os/unix/ngx_channel.o \
objs/src/os/unix/ngx_shmem.o \
objs/src/os/unix/ngx_process.o \
objs/src/os/unix/ngx_daemon.o \
objs/src/os/unix/ngx_setaffinity.o \
objs/src/os/unix/ngx_setproctitle.o \
objs/src/os/unix/ngx_posix_init.o \
objs/src/os/unix/ngx_user.o \
objs/src/os/unix/ngx_process_cycle.o \
objs/src/os/unix/ngx_linux_init.o \
objs/src/event/modules/ngx_epoll_module.o \
objs/src/os/unix/ngx_linux_sendfile_chain.o \
objs/src/core/ngx_regex.o \
objs/src/http/ngx_http.o \
objs/src/http/ngx_http_core_module.o \
objs/src/http/ngx_http_special_response.o \
objs/src/http/ngx_http_request.o \
objs/src/http/ngx_http_parse.o \
objs/src/http/ngx_http_header_filter_module.o \
objs/src/http/ngx_http_write_filter_module.o \
objs/src/http/ngx_http_copy_filter_module.o \
objs/src/http/modules/ngx_http_log_module.o \
objs/src/http/ngx_http_request_body.o \
objs/src/http/ngx_http_variables.o \
objs/src/http/ngx_http_script.o \
objs/src/http/ngx_http_upstream.o \
objs/src/http/ngx_http_upstream_round_robin.o \
objs/src/http/ngx_http_parse_time.o \
objs/src/http/modules/ngx_http_static_module.o \
objs/src/http/modules/ngx_http_index_module.o \
objs/src/http/modules/ngx_http_chunked_filter_module.o \
objs/src/http/modules/ngx_http_range_filter_module.o \
objs/src/http/modules/ngx_http_headers_filter_module.o \
objs/src/http/modules/ngx_http_not_modified_filter_module.o \
objs/src/http/ngx_http_busy_lock.o \
objs/src/http/ngx_http_file_cache.o \
objs/src/http/modules/ngx_http_gzip_filter_module.o \
objs/src/http/ngx_http_postpone_filter_module.o \
objs/src/http/modules/ngx_http_ssi_filter_module.o \
objs/src/http/modules/ngx_http_charset_filter_module.o \
objs/src/http/modules/ngx_http_userid_filter_module.o \
objs/src/http/modules/ngx_http_autoindex_module.o \
objs/src/http/modules/ngx_http_auth_basic_module.o \
objs/src/http/modules/ngx_http_access_module.o \
objs/src/http/modules/ngx_http_limit_conn_module.o \
objs/src/http/modules/ngx_http_limit_req_module.o \
objs/src/http/modules/ngx_http_geo_module.o \
objs/src/http/modules/ngx_http_map_module.o \
objs/src/http/modules/ngx_http_split_clients_module.o \
objs/src/http/modules/ngx_http_referer_module.o \
objs/src/http/modules/ngx_http_rewrite_module.o \
objs/src/http/modules/ngx_http_proxy_module.o \
objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/addon/src/ndk.o \
objs/addon/src/ngx_http_lua_script.o \
objs/addon/src/ngx_http_lua_log.o \
objs/addon/src/ngx_http_lua_subrequest.o \
objs/addon/src/ngx_http_lua_ndk.o \
objs/addon/src/ngx_http_lua_control.o \
objs/addon/src/ngx_http_lua_time.o \
objs/addon/src/ngx_http_lua_misc.o \
objs/addon/src/ngx_http_lua_variable.o \
objs/addon/src/ngx_http_lua_string.o \
objs/addon/src/ngx_http_lua_output.o \
objs/addon/src/ngx_http_lua_headers.o \
objs/addon/src/ngx_http_lua_req_body.o \
objs/addon/src/ngx_http_lua_uri.o \
objs/addon/src/ngx_http_lua_args.o \
objs/addon/src/ngx_http_lua_ctx.o \
objs/addon/src/ngx_http_lua_regex.o \
objs/addon/src/ngx_http_lua_module.o \
objs/addon/src/ngx_http_lua_headers_out.o \
objs/addon/src/ngx_http_lua_headers_in.o \
objs/addon/src/ngx_http_lua_directive.o \
objs/addon/src/ngx_http_lua_consts.o \
objs/addon/src/ngx_http_lua_exception.o \
objs/addon/src/ngx_http_lua_util.o \
objs/addon/src/ngx_http_lua_cache.o \
objs/addon/src/ngx_http_lua_contentby.o \
objs/addon/src/ngx_http_lua_rewriteby.o \
objs/addon/src/ngx_http_lua_accessby.o \
objs/addon/src/ngx_http_lua_setby.o \
objs/addon/src/ngx_http_lua_capturefilter.o \
objs/addon/src/ngx_http_lua_clfactory.o \
objs/addon/src/ngx_http_lua_pcrefix.o \
objs/addon/src/ngx_http_lua_headerfilterby.o \
objs/addon/src/ngx_http_lua_shdict.o \
objs/addon/src/ngx_http_lua_socket_tcp.o \
objs/addon/src/ngx_http_lua_api.o \
objs/addon/src/ngx_http_lua_logby.o \
objs/addon/src/ngx_http_lua_sleep.o \
objs/addon/src/ngx_http_lua_coroutine.o \
objs/addon/src/ngx_http_lua_bodyfilterby.o \
objs/addon/src/ngx_http_lua_initby.o \
objs/addon/src/ngx_http_lua_initworkerby.o \
objs/addon/src/ngx_http_lua_socket_udp.o \
objs/addon/src/ngx_http_lua_req_method.o \
objs/addon/src/ngx_http_lua_phase.o \
objs/addon/src/ngx_http_lua_uthread.o \
objs/addon/src/ngx_http_lua_timer.o \
objs/addon/src/ngx_http_lua_config.o \
objs/addon/src/ngx_http_lua_worker.o \
objs/ngx_modules.o \
-Wl,-rpath,/usr/apps/luajit/lib -Wl,-E -lpthread -lcrypt -L/usr/apps/luajit/lib -lluajit-5.1 -lm pcre-8.36/.libs/libpcre.a zlib-1.2.8/libz.a
make[1]:正在离开目录 `/usr/apps/nginx-1.7.10'
make -f objs/Makefile manpage
make[1]: 正在进入目录 `/usr/apps/nginx-1.7.10'
sed -e "s|%%PREFIX%%|/usr/apps/nginx|" \
-e "s|%%PID_PATH%%|/usr/apps/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/usr/apps/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/usr/apps/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]:正在离开目录 `/usr/apps/nginx-1.7.10'
# 6. install(安装)
make install
make install
相关推荐
在本篇中,我们将深入探讨Nginx的源码,并详细介绍如何编译安装带有RTMP模块的Nginx。 首先,我们来看Nginx的源码结构。Nginx的源码主要分为以下几个部分: 1. **核心引擎**:这是Nginx的核心,包括事件处理机制、...
本文将详细讲解在基于ARM架构的系统上编译安装Nginx的过程,这对于那些希望在嵌入式设备或基于ARM的服务器上运行高性能Web服务的用户来说至关重要。 首先,你需要确保你的ARM系统已经安装了必要的编译工具和依赖库...
在CentOS 6.3系统中编译安装Nginx、PHP以及MySQL是一项涉及多个步骤的任务,包括系统配置、源码包的下载、安装必要的编译工具和依赖库、编译源码以及配置和启动服务。以下是根据提供的文件内容整理的知识点。 1. ...
9. **调试Nginx模块**:如果你正在开发Nginx模块,确保在配置阶段指定了模块的源代码目录,并在`objs/Makefile`中包含相应的对象文件。调试模块时,同样可以在源代码中设置断点,然后启动调试。 通过以上步骤,你...
编译时,需要获取源代码并配置相应的编译选项来满足特定需求,例如支持HTTP/2、Gzip压缩等。 3. **nginx-rtmp-module**:这是一个用于Nginx的实时流媒体传输模块,支持RTMP协议,可以处理视频流发布、播放、录制等...
这个压缩包包含了编译 Nginx 服务器所需的所有源代码文件、配置文件模板(如 nginx.conf)、模块源码以及构建和安装说明。通过解压这个压缩包,您可以在支持 C 语言编译器的操作系统上编译并安装 Nginx 1.24.0。 ...
这个过程涉及到对Nginx源码的下载、依赖库的准备以及编译构建等步骤。下面我们将详细讨论"nginx离线编译安装依赖"这一主题。 首先,我们需要理解Nginx编译安装的基本流程: 1. **下载Nginx源码**:访问Nginx官方...
2. **下载源码**:从 Nginx 官方网站或者 GitHub 下载最新版本的源代码。 3. **解压源码**:使用 `tar` 命令解压缩下载的 `.tar.gz` 文件。 4. **配置编译参数**:进入解压后的目录,使用 `./configure` 命令配置...
本篇文章将详细讲解如何在Windows环境下,使用Visual Studio 2010编译并运行Nginx源码。 **一、环境准备** 在编译Nginx源码前,我们需要确保以下软件已经安装: 1. **Visual Studio 2010**:作为C/C++编译器,...
在IT行业中,尤其是在服务器配置和Web服务领域,CentOS是一个非常流行的Linux发行版,而Nginx是一款高性能...在CentOS 7.0上,通过正确编译安装Nginx以及openssl、pcre和zlib,可以构建一个高效且安全的Web服务器环境。
这个资源包通常包括Nginx的源代码、编译所需的依赖库以及配置脚本。"nginx离线"这个文件可能就是这样的资源包。确保该包包含了最新的稳定版本,以确保最佳性能和安全性。 1. **下载与解压资源包**: - 在有外网...
Nginx源代码分析是学习使用Nginx源码开发人员的指导丛书,为开发者提供了详细的Nginx源代码分析指导。下面是对Nginx源代码的分析指导。 目录结构 Nginx的源码目录结构层次明确,从自动编译脚本到各级的源码,层次...
如果需要,可以手动下载源代码并编译安装。 6. **其他可选模块**:根据需求,可能还需要安装其他第三方模块,如 ngx_http_realip_module 用于识别客户端真实IP, ngx_pagespeed 模块用于网站性能优化等。这些模块...
然后下载Nginx源代码和`nginx-http-flv-module`源码,通过Nginx的configure脚本配置编译选项,将模块加入到Nginx中,接着执行make命令进行编译。需要注意的是,编译时可能需要额外的依赖库,如OpenSSL、PCRE等。 5....
深入研究Nginx的源代码,能帮助开发者理解如何构建高性能、低延迟的网络服务,并为自定义扩展提供基础。对于想要优化服务器性能或开发网络应用的人来说,理解Nginx的源代码无疑是一项重要的技能。
这里我们讨论的是一个包含Nginx安装文件、PHP安装文件、补丁和源码的压缩包,这将帮助我们快速搭建一个支持动态内容的Web服务器。 首先,让我们深入了解Nginx。Nginx是一款高性能的HTTP和反向代理服务器,以其高效...
解压Nginx源码,配置并编译,如: - `./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre=指定pcre的安装路径 --with-zlib=指定zlib的安装路径 --with-openssl=指定openssl的安装路径` - ...
- 使用mingw编译Nginx源码,生成可执行文件。 - 最后,配置Nginx服务器的设置,如监听端口、RTMP流的处理规则等,然后启动Nginx服务。 在Windows环境下,这个过程可能会比在Linux上复杂,因为需要处理更多的依赖性...