当前位置:   article > 正文

linux 系统下搭建nginx_linux 体统搭建negix

linux 体统搭建negix

Nginx(一):linux下安装nginx与配置

linux系统为Centos 64位

准备目录

[root@instance-3lm099to ~]# mkdir /usr/local/nginx
[root@instance-3lm099to ~]# cd /usr/local/nginx/

下载

从http://nginx.org/download/上下载相应的版本(或者wget http://nginx.org/download/nginx-1.5.9.tar.gz直接在Linux上用命令下载)

解压

解压 tar -zxvf nginx-1.5.9.tar.gz 

解压好后移至目录

[root@instance-3lm099to nginx]# cd nginx-1.5.9/

设置Nginx安装路径,如果没有指定,默认为/usr/local/nginx

  1. [root@instance-3lm099to nginx-1.14.0]# ./configure --prefix=/usr/local/nginx
  2. checking for OS
  3. + Linux 3.10.0-862.3.2.el7.x86_64 x86_64
  4. checking for C compiler ... not found

如果出现红色字体错误,需要执行下

[root@instance-3lm099to nginx-1.14.0]# yum -y install gcc gcc-c++ autoconf automake make

再次执行

[root@instance-3lm099to nginx-1.14.0]# ./configure --prefix=/usr/local/nginx

可能会出现这个错误

  1. ./configure: error: the HTTP rewrite module requires the PCRE library.
  2. You can either disable the module by using --without-http_rewrite_module
  3. option, or install the PCRE library into the system, or build the PCRE library
  4. statically from the source with nginx by using --with-pcre=<path> option.

如果出现了,就执行下这个

[root@instance-3lm099to nginx-1.14.0]# yum -y install openssl openssl-devel

再次执行

复制代码

  1. [root@instance-3lm099to nginx-1.14.0]# ./configure --prefix=/usr/local/nginx
  2. checking for OS
  3. + Linux 3.10.0-862.3.2.el7.x86_64 x86_64
  4. checking for C compiler ... found
  5. + using GNU C compiler
  6. + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
  7. checking for gcc -pipe switch ... found
  8. checking for -Wl,-E switch ... found
  9. checking for gcc builtin atomic operations ... found
  10. checking for C99 variadic macros ... found
  11. checking for gcc variadic macros ... found
  12. checking for gcc builtin 64 bit byteswap ... found
  13. checking for unistd.h ... found
  14. checking for inttypes.h ... found
  15. checking for limits.h ... found
  16. checking for sys/filio.h ... not found
  17. checking for sys/param.h ... found
  18. checking for sys/mount.h ... found
  19. checking for sys/statvfs.h ... found
  20. checking for crypt.h ... found
  21. checking for Linux specific features
  22. checking for epoll ... found
  23. checking for EPOLLRDHUP ... found
  24. checking for EPOLLEXCLUSIVE ... not found
  25. checking for O_PATH ... found
  26. checking for sendfile() ... found
  27. checking for sendfile64() ... found
  28. checking for sys/prctl.h ... found
  29. checking for prctl(PR_SET_DUMPABLE) ... found
  30. checking for prctl(PR_SET_KEEPCAPS) ... found
  31. checking for capabilities ... found
  32. checking for crypt_r() ... found
  33. checking for sys/vfs.h ... found
  34. checking for nobody group ... found
  35. checking for poll() ... found
  36. checking for /dev/poll ... not found
  37. checking for kqueue ... not found
  38. checking for crypt() ... not found
  39. checking for crypt() in libcrypt ... found
  40. checking for F_READAHEAD ... not found
  41. checking for posix_fadvise() ... found
  42. checking for O_DIRECT ... found
  43. checking for F_NOCACHE ... not found
  44. checking for directio() ... not found
  45. checking for statfs() ... found
  46. checking for statvfs() ... found
  47. checking for dlopen() ... not found
  48. checking for dlopen() in libdl ... found
  49. checking for sched_yield() ... found
  50. checking for sched_setaffinity() ... found
  51. checking for SO_SETFIB ... not found
  52. checking for SO_REUSEPORT ... found
  53. checking for SO_ACCEPTFILTER ... not found
  54. checking for SO_BINDANY ... not found
  55. checking for IP_TRANSPARENT ... found
  56. checking for IP_BINDANY ... not found
  57. checking for IP_BIND_ADDRESS_NO_PORT ... not found
  58. checking for IP_RECVDSTADDR ... not found
  59. checking for IP_SENDSRCADDR ... not found
  60. checking for IP_PKTINFO ... found
  61. checking for IPV6_RECVPKTINFO ... found
  62. checking for TCP_DEFER_ACCEPT ... found
  63. checking for TCP_KEEPIDLE ... found
  64. checking for TCP_FASTOPEN ... found
  65. checking for TCP_INFO ... found
  66. checking for accept4() ... found
  67. checking for eventfd() ... found
  68. checking for int size ... 4 bytes
  69. checking for long size ... 8 bytes
  70. checking for long long size ... 8 bytes
  71. checking for void * size ... 8 bytes
  72. checking for uint32_t ... found
  73. checking for uint64_t ... found
  74. checking for sig_atomic_t ... found
  75. checking for sig_atomic_t size ... 4 bytes
  76. checking for socklen_t ... found
  77. checking for in_addr_t ... found
  78. checking for in_port_t ... found
  79. checking for rlim_t ... found
  80. checking for uintptr_t ... uintptr_t found
  81. checking for system byte ordering ... little endian
  82. checking for size_t size ... 8 bytes
  83. checking for off_t size ... 8 bytes
  84. checking for time_t size ... 8 bytes
  85. checking for AF_INET6 ... found
  86. checking for setproctitle() ... not found
  87. checking for pread() ... found
  88. checking for pwrite() ... found
  89. checking for pwritev() ... found
  90. checking for sys_nerr ... found
  91. checking for localtime_r() ... found
  92. checking for clock_gettime(CLOCK_MONOTONIC) ... found
  93. checking for posix_memalign() ... found
  94. checking for memalign() ... found
  95. checking for mmap(MAP_ANON|MAP_SHARED) ... found
  96. checking for mmap("/dev/zero", MAP_SHARED) ... found
  97. checking for System V shared memory ... found
  98. checking for POSIX semaphores ... not found
  99. checking for POSIX semaphores in libpthread ... found
  100. checking for struct msghdr.msg_control ... found
  101. checking for ioctl(FIONBIO) ... found
  102. checking for struct tm.tm_gmtoff ... found
  103. checking for struct dirent.d_namlen ... not found
  104. checking for struct dirent.d_type ... found
  105. checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
  106. checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
  107. checking for openat(), fstatat() ... found
  108. checking for getaddrinfo() ... found
  109. checking for PCRE library ... found
  110. checking for PCRE JIT support ... found
  111. checking for zlib library ... found
  112. creating objs/Makefile
  113. Configuration summary
  114. + using system PCRE library
  115. + OpenSSL library is not used
  116. + using system zlib library
  117. nginx path prefix: "/usr/local/nginx"
  118. nginx binary file: "/usr/local/nginx/sbin/nginx"
  119. nginx modules path: "/usr/local/nginx/modules"
  120. nginx configuration prefix: "/usr/local/nginx/conf"
  121. nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  122. nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  123. nginx error log file: "/usr/local/nginx/logs/error.log"
  124. nginx http access log file: "/usr/local/nginx/logs/access.log"
  125. nginx http client request body temporary files: "client_body_temp"
  126. nginx http proxy temporary files: "proxy_temp"
  127. nginx http fastcgi temporary files: "fastcgi_temp"
  128. nginx http uwsgi temporary files: "uwsgi_temp"
  129. nginx http scgi temporary files: "scgi_temp"

复制代码

编译

make (make的过程是把各种语言写的源码文件,变成可执行文件和各种库文件)

复制代码

  1. [root@instance-3lm099to nginx-1.14.0]# make
  2. make -f objs/Makefile
  3. make[1]: Entering directory `/usr/local/nginx/nginx-1.14.0'
  4. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  5. -o objs/src/core/nginx.o \
  6. src/core/nginx.c
  7. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  8. -o objs/src/core/ngx_log.o \
  9. src/core/ngx_log.c
  10. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  11. -o objs/src/core/ngx_palloc.o \
  12. src/core/ngx_palloc.c
  13. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  14. -o objs/src/core/ngx_array.o \
  15. src/core/ngx_array.c
  16. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  17. -o objs/src/core/ngx_list.o \
  18. src/core/ngx_list.c
  19. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  20. -o objs/src/core/ngx_hash.o \
  21. src/core/ngx_hash.c
  22. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  23. -o objs/src/core/ngx_buf.o \
  24. src/core/ngx_buf.c
  25. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  26. -o objs/src/core/ngx_queue.o \
  27. src/core/ngx_queue.c
  28. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  29. -o objs/src/core/ngx_output_chain.o \
  30. src/core/ngx_output_chain.c
  31. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  32. -o objs/src/core/ngx_string.o \
  33. src/core/ngx_string.c
  34. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  35. -o objs/src/core/ngx_parse.o \
  36. src/core/ngx_parse.c
  37. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  38. -o objs/src/core/ngx_parse_time.o \
  39. src/core/ngx_parse_time.c
  40. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  41. -o objs/src/core/ngx_inet.o \
  42. src/core/ngx_inet.c
  43. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  44. -o objs/src/core/ngx_file.o \
  45. src/core/ngx_file.c
  46. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  47. -o objs/src/core/ngx_crc32.o \
  48. src/core/ngx_crc32.c
  49. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  50. -o objs/src/core/ngx_murmurhash.o \
  51. src/core/ngx_murmurhash.c
  52. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  53. -o objs/src/core/ngx_md5.o \
  54. src/core/ngx_md5.c
  55. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  56. -o objs/src/core/ngx_sha1.o \
  57. src/core/ngx_sha1.c
  58. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  59. -o objs/src/core/ngx_rbtree.o \
  60. src/core/ngx_rbtree.c
  61. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  62. -o objs/src/core/ngx_radix_tree.o \
  63. src/core/ngx_radix_tree.c
  64. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  65. -o objs/src/core/ngx_slab.o \
  66. src/core/ngx_slab.c
  67. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  68. -o objs/src/core/ngx_times.o \
  69. src/core/ngx_times.c
  70. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  71. -o objs/src/core/ngx_shmtx.o \
  72. src/core/ngx_shmtx.c
  73. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  74. -o objs/src/core/ngx_connection.o \
  75. src/core/ngx_connection.c
  76. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  77. -o objs/src/core/ngx_cycle.o \
  78. src/core/ngx_cycle.c
  79. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  80. -o objs/src/core/ngx_spinlock.o \
  81. src/core/ngx_spinlock.c
  82. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  83. -o objs/src/core/ngx_rwlock.o \
  84. src/core/ngx_rwlock.c
  85. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  86. -o objs/src/core/ngx_cpuinfo.o \
  87. src/core/ngx_cpuinfo.c
  88. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  89. -o objs/src/core/ngx_conf_file.o \
  90. src/core/ngx_conf_file.c
  91. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  92. -o objs/src/core/ngx_module.o \
  93. src/core/ngx_module.c
  94. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  95. -o objs/src/core/ngx_resolver.o \
  96. src/core/ngx_resolver.c
  97. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  98. -o objs/src/core/ngx_open_file_cache.o \
  99. src/core/ngx_open_file_cache.c
  100. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  101. -o objs/src/core/ngx_crypt.o \
  102. src/core/ngx_crypt.c
  103. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  104. -o objs/src/core/ngx_proxy_protocol.o \
  105. src/core/ngx_proxy_protocol.c
  106. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  107. -o objs/src/core/ngx_syslog.o \
  108. src/core/ngx_syslog.c
  109. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  110. -o objs/src/event/ngx_event.o \
  111. src/event/ngx_event.c
  112. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  113. -o objs/src/event/ngx_event_timer.o \
  114. src/event/ngx_event_timer.c
  115. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  116. -o objs/src/event/ngx_event_posted.o \
  117. src/event/ngx_event_posted.c
  118. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  119. -o objs/src/event/ngx_event_accept.o \
  120. src/event/ngx_event_accept.c
  121. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  122. -o objs/src/event/ngx_event_connect.o \
  123. src/event/ngx_event_connect.c
  124. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  125. -o objs/src/event/ngx_event_pipe.o \
  126. src/event/ngx_event_pipe.c
  127. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  128. -o objs/src/os/unix/ngx_time.o \
  129. src/os/unix/ngx_time.c
  130. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  131. -o objs/src/os/unix/ngx_errno.o \
  132. src/os/unix/ngx_errno.c
  133. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  134. -o objs/src/os/unix/ngx_alloc.o \
  135. src/os/unix/ngx_alloc.c
  136. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  137. -o objs/src/os/unix/ngx_files.o \
  138. src/os/unix/ngx_files.c
  139. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  140. -o objs/src/os/unix/ngx_socket.o \
  141. src/os/unix/ngx_socket.c
  142. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  143. -o objs/src/os/unix/ngx_recv.o \
  144. src/os/unix/ngx_recv.c
  145. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  146. -o objs/src/os/unix/ngx_readv_chain.o \
  147. src/os/unix/ngx_readv_chain.c
  148. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  149. -o objs/src/os/unix/ngx_udp_recv.o \
  150. src/os/unix/ngx_udp_recv.c
  151. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  152. -o objs/src/os/unix/ngx_send.o \
  153. src/os/unix/ngx_send.c
  154. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  155. -o objs/src/os/unix/ngx_writev_chain.o \
  156. src/os/unix/ngx_writev_chain.c
  157. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  158. -o objs/src/os/unix/ngx_udp_send.o \
  159. src/os/unix/ngx_udp_send.c
  160. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  161. -o objs/src/os/unix/ngx_udp_sendmsg_chain.o \
  162. src/os/unix/ngx_udp_sendmsg_chain.c
  163. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  164. -o objs/src/os/unix/ngx_channel.o \
  165. src/os/unix/ngx_channel.c
  166. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  167. -o objs/src/os/unix/ngx_shmem.o \
  168. src/os/unix/ngx_shmem.c
  169. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  170. -o objs/src/os/unix/ngx_process.o \
  171. src/os/unix/ngx_process.c
  172. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  173. -o objs/src/os/unix/ngx_daemon.o \
  174. src/os/unix/ngx_daemon.c
  175. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  176. -o objs/src/os/unix/ngx_setaffinity.o \
  177. src/os/unix/ngx_setaffinity.c
  178. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  179. -o objs/src/os/unix/ngx_setproctitle.o \
  180. src/os/unix/ngx_setproctitle.c
  181. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  182. -o objs/src/os/unix/ngx_posix_init.o \
  183. src/os/unix/ngx_posix_init.c
  184. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  185. -o objs/src/os/unix/ngx_user.o \
  186. src/os/unix/ngx_user.c
  187. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  188. -o objs/src/os/unix/ngx_dlopen.o \
  189. src/os/unix/ngx_dlopen.c
  190. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  191. -o objs/src/os/unix/ngx_process_cycle.o \
  192. src/os/unix/ngx_process_cycle.c
  193. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  194. -o objs/src/os/unix/ngx_linux_init.o \
  195. src/os/unix/ngx_linux_init.c
  196. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  197. -o objs/src/event/modules/ngx_epoll_module.o \
  198. src/event/modules/ngx_epoll_module.c
  199. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  200. -o objs/src/os/unix/ngx_linux_sendfile_chain.o \
  201. src/os/unix/ngx_linux_sendfile_chain.c
  202. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  203. -o objs/src/core/ngx_regex.o \
  204. src/core/ngx_regex.c
  205. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  206. -o objs/src/http/ngx_http.o \
  207. src/http/ngx_http.c
  208. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  209. -o objs/src/http/ngx_http_core_module.o \
  210. src/http/ngx_http_core_module.c
  211. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  212. -o objs/src/http/ngx_http_special_response.o \
  213. src/http/ngx_http_special_response.c
  214. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  215. -o objs/src/http/ngx_http_request.o \
  216. src/http/ngx_http_request.c
  217. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  218. -o objs/src/http/ngx_http_parse.o \
  219. src/http/ngx_http_parse.c
  220. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  221. -o objs/src/http/modules/ngx_http_log_module.o \
  222. src/http/modules/ngx_http_log_module.c
  223. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  224. -o objs/src/http/ngx_http_request_body.o \
  225. src/http/ngx_http_request_body.c
  226. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  227. -o objs/src/http/ngx_http_variables.o \
  228. src/http/ngx_http_variables.c
  229. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  230. -o objs/src/http/ngx_http_script.o \
  231. src/http/ngx_http_script.c
  232. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  233. -o objs/src/http/ngx_http_upstream.o \
  234. src/http/ngx_http_upstream.c
  235. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  236. -o objs/src/http/ngx_http_upstream_round_robin.o \
  237. src/http/ngx_http_upstream_round_robin.c
  238. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  239. -o objs/src/http/ngx_http_file_cache.o \
  240. src/http/ngx_http_file_cache.c
  241. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  242. -o objs/src/http/ngx_http_write_filter_module.o \
  243. src/http/ngx_http_write_filter_module.c
  244. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  245. -o objs/src/http/ngx_http_header_filter_module.o \
  246. src/http/ngx_http_header_filter_module.c
  247. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  248. -o objs/src/http/modules/ngx_http_chunked_filter_module.o \
  249. src/http/modules/ngx_http_chunked_filter_module.c
  250. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  251. -o objs/src/http/modules/ngx_http_range_filter_module.o \
  252. src/http/modules/ngx_http_range_filter_module.c
  253. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  254. -o objs/src/http/modules/ngx_http_gzip_filter_module.o \
  255. src/http/modules/ngx_http_gzip_filter_module.c
  256. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  257. -o objs/src/http/ngx_http_postpone_filter_module.o \
  258. src/http/ngx_http_postpone_filter_module.c
  259. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  260. -o objs/src/http/modules/ngx_http_ssi_filter_module.o \
  261. src/http/modules/ngx_http_ssi_filter_module.c
  262. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  263. -o objs/src/http/modules/ngx_http_charset_filter_module.o \
  264. src/http/modules/ngx_http_charset_filter_module.c
  265. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  266. -o objs/src/http/modules/ngx_http_userid_filter_module.o \
  267. src/http/modules/ngx_http_userid_filter_module.c
  268. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  269. -o objs/src/http/modules/ngx_http_headers_filter_module.o \
  270. src/http/modules/ngx_http_headers_filter_module.c
  271. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  272. -o objs/src/http/ngx_http_copy_filter_module.o \
  273. src/http/ngx_http_copy_filter_module.c
  274. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  275. -o objs/src/http/modules/ngx_http_not_modified_filter_module.o \
  276. src/http/modules/ngx_http_not_modified_filter_module.c
  277. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  278. -o objs/src/http/modules/ngx_http_static_module.o \
  279. src/http/modules/ngx_http_static_module.c
  280. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  281. -o objs/src/http/modules/ngx_http_autoindex_module.o \
  282. src/http/modules/ngx_http_autoindex_module.c
  283. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  284. -o objs/src/http/modules/ngx_http_index_module.o \
  285. src/http/modules/ngx_http_index_module.c
  286. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  287. -o objs/src/http/modules/ngx_http_mirror_module.o \
  288. src/http/modules/ngx_http_mirror_module.c
  289. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  290. -o objs/src/http/modules/ngx_http_try_files_module.o \
  291. src/http/modules/ngx_http_try_files_module.c
  292. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  293. -o objs/src/http/modules/ngx_http_auth_basic_module.o \
  294. src/http/modules/ngx_http_auth_basic_module.c
  295. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  296. -o objs/src/http/modules/ngx_http_access_module.o \
  297. src/http/modules/ngx_http_access_module.c
  298. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  299. -o objs/src/http/modules/ngx_http_limit_conn_module.o \
  300. src/http/modules/ngx_http_limit_conn_module.c
  301. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  302. -o objs/src/http/modules/ngx_http_limit_req_module.o \
  303. src/http/modules/ngx_http_limit_req_module.c
  304. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  305. -o objs/src/http/modules/ngx_http_geo_module.o \
  306. src/http/modules/ngx_http_geo_module.c
  307. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  308. -o objs/src/http/modules/ngx_http_map_module.o \
  309. src/http/modules/ngx_http_map_module.c
  310. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  311. -o objs/src/http/modules/ngx_http_split_clients_module.o \
  312. src/http/modules/ngx_http_split_clients_module.c
  313. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  314. -o objs/src/http/modules/ngx_http_referer_module.o \
  315. src/http/modules/ngx_http_referer_module.c
  316. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  317. -o objs/src/http/modules/ngx_http_rewrite_module.o \
  318. src/http/modules/ngx_http_rewrite_module.c
  319. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  320. -o objs/src/http/modules/ngx_http_proxy_module.o \
  321. src/http/modules/ngx_http_proxy_module.c
  322. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  323. -o objs/src/http/modules/ngx_http_fastcgi_module.o \
  324. src/http/modules/ngx_http_fastcgi_module.c
  325. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  326. -o objs/src/http/modules/ngx_http_uwsgi_module.o \
  327. src/http/modules/ngx_http_uwsgi_module.c
  328. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  329. -o objs/src/http/modules/ngx_http_scgi_module.o \
  330. src/http/modules/ngx_http_scgi_module.c
  331. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  332. -o objs/src/http/modules/ngx_http_memcached_module.o \
  333. src/http/modules/ngx_http_memcached_module.c
  334. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  335. -o objs/src/http/modules/ngx_http_empty_gif_module.o \
  336. src/http/modules/ngx_http_empty_gif_module.c
  337. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  338. -o objs/src/http/modules/ngx_http_browser_module.o \
  339. src/http/modules/ngx_http_browser_module.c
  340. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  341. -o objs/src/http/modules/ngx_http_upstream_hash_module.o \
  342. src/http/modules/ngx_http_upstream_hash_module.c
  343. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  344. -o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
  345. src/http/modules/ngx_http_upstream_ip_hash_module.c
  346. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  347. -o objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
  348. src/http/modules/ngx_http_upstream_least_conn_module.c
  349. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  350. -o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
  351. src/http/modules/ngx_http_upstream_keepalive_module.c
  352. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
  353. -o objs/src/http/modules/ngx_http_upstream_zone_module.o \
  354. src/http/modules/ngx_http_upstream_zone_module.c
  355. cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  356. -o objs/ngx_modules.o \
  357. objs/ngx_modules.c
  358. cc -o objs/nginx \
  359. objs/src/core/nginx.o \
  360. objs/src/core/ngx_log.o \
  361. objs/src/core/ngx_palloc.o \
  362. objs/src/core/ngx_array.o \
  363. objs/src/core/ngx_list.o \
  364. objs/src/core/ngx_hash.o \
  365. objs/src/core/ngx_buf.o \
  366. objs/src/core/ngx_queue.o \
  367. objs/src/core/ngx_output_chain.o \
  368. objs/src/core/ngx_string.o \
  369. objs/src/core/ngx_parse.o \
  370. objs/src/core/ngx_parse_time.o \
  371. objs/src/core/ngx_inet.o \
  372. objs/src/core/ngx_file.o \
  373. objs/src/core/ngx_crc32.o \
  374. objs/src/core/ngx_murmurhash.o \
  375. objs/src/core/ngx_md5.o \
  376. objs/src/core/ngx_sha1.o \
  377. objs/src/core/ngx_rbtree.o \
  378. objs/src/core/ngx_radix_tree.o \
  379. objs/src/core/ngx_slab.o \
  380. objs/src/core/ngx_times.o \
  381. objs/src/core/ngx_shmtx.o \
  382. objs/src/core/ngx_connection.o \
  383. objs/src/core/ngx_cycle.o \
  384. objs/src/core/ngx_spinlock.o \
  385. objs/src/core/ngx_rwlock.o \
  386. objs/src/core/ngx_cpuinfo.o \
  387. objs/src/core/ngx_conf_file.o \
  388. objs/src/core/ngx_module.o \
  389. objs/src/core/ngx_resolver.o \
  390. objs/src/core/ngx_open_file_cache.o \
  391. objs/src/core/ngx_crypt.o \
  392. objs/src/core/ngx_proxy_protocol.o \
  393. objs/src/core/ngx_syslog.o \
  394. objs/src/event/ngx_event.o \
  395. objs/src/event/ngx_event_timer.o \
  396. objs/src/event/ngx_event_posted.o \
  397. objs/src/event/ngx_event_accept.o \
  398. objs/src/event/ngx_event_connect.o \
  399. objs/src/event/ngx_event_pipe.o \
  400. objs/src/os/unix/ngx_time.o \
  401. objs/src/os/unix/ngx_errno.o \
  402. objs/src/os/unix/ngx_alloc.o \
  403. objs/src/os/unix/ngx_files.o \
  404. objs/src/os/unix/ngx_socket.o \
  405. objs/src/os/unix/ngx_recv.o \
  406. objs/src/os/unix/ngx_readv_chain.o \
  407. objs/src/os/unix/ngx_udp_recv.o \
  408. objs/src/os/unix/ngx_send.o \
  409. objs/src/os/unix/ngx_writev_chain.o \
  410. objs/src/os/unix/ngx_udp_send.o \
  411. objs/src/os/unix/ngx_udp_sendmsg_chain.o \
  412. objs/src/os/unix/ngx_channel.o \
  413. objs/src/os/unix/ngx_shmem.o \
  414. objs/src/os/unix/ngx_process.o \
  415. objs/src/os/unix/ngx_daemon.o \
  416. objs/src/os/unix/ngx_setaffinity.o \
  417. objs/src/os/unix/ngx_setproctitle.o \
  418. objs/src/os/unix/ngx_posix_init.o \
  419. objs/src/os/unix/ngx_user.o \
  420. objs/src/os/unix/ngx_dlopen.o \
  421. objs/src/os/unix/ngx_process_cycle.o \
  422. objs/src/os/unix/ngx_linux_init.o \
  423. objs/src/event/modules/ngx_epoll_module.o \
  424. objs/src/os/unix/ngx_linux_sendfile_chain.o \
  425. objs/src/core/ngx_regex.o \
  426. objs/src/http/ngx_http.o \
  427. objs/src/http/ngx_http_core_module.o \
  428. objs/src/http/ngx_http_special_response.o \
  429. objs/src/http/ngx_http_request.o \
  430. objs/src/http/ngx_http_parse.o \
  431. objs/src/http/modules/ngx_http_log_module.o \
  432. objs/src/http/ngx_http_request_body.o \
  433. objs/src/http/ngx_http_variables.o \
  434. objs/src/http/ngx_http_script.o \
  435. objs/src/http/ngx_http_upstream.o \
  436. objs/src/http/ngx_http_upstream_round_robin.o \
  437. objs/src/http/ngx_http_file_cache.o \
  438. objs/src/http/ngx_http_write_filter_module.o \
  439. objs/src/http/ngx_http_header_filter_module.o \
  440. objs/src/http/modules/ngx_http_chunked_filter_module.o \
  441. objs/src/http/modules/ngx_http_range_filter_module.o \
  442. objs/src/http/modules/ngx_http_gzip_filter_module.o \
  443. objs/src/http/ngx_http_postpone_filter_module.o \
  444. objs/src/http/modules/ngx_http_ssi_filter_module.o \
  445. objs/src/http/modules/ngx_http_charset_filter_module.o \
  446. objs/src/http/modules/ngx_http_userid_filter_module.o \
  447. objs/src/http/modules/ngx_http_headers_filter_module.o \
  448. objs/src/http/ngx_http_copy_filter_module.o \
  449. objs/src/http/modules/ngx_http_not_modified_filter_module.o \
  450. objs/src/http/modules/ngx_http_static_module.o \
  451. objs/src/http/modules/ngx_http_autoindex_module.o \
  452. objs/src/http/modules/ngx_http_index_module.o \
  453. objs/src/http/modules/ngx_http_mirror_module.o \
  454. objs/src/http/modules/ngx_http_try_files_module.o \
  455. objs/src/http/modules/ngx_http_auth_basic_module.o \
  456. objs/src/http/modules/ngx_http_access_module.o \
  457. objs/src/http/modules/ngx_http_limit_conn_module.o \
  458. objs/src/http/modules/ngx_http_limit_req_module.o \
  459. objs/src/http/modules/ngx_http_geo_module.o \
  460. objs/src/http/modules/ngx_http_map_module.o \
  461. objs/src/http/modules/ngx_http_split_clients_module.o \
  462. objs/src/http/modules/ngx_http_referer_module.o \
  463. objs/src/http/modules/ngx_http_rewrite_module.o \
  464. objs/src/http/modules/ngx_http_proxy_module.o \
  465. objs/src/http/modules/ngx_http_fastcgi_module.o \
  466. objs/src/http/modules/ngx_http_uwsgi_module.o \
  467. objs/src/http/modules/ngx_http_scgi_module.o \
  468. objs/src/http/modules/ngx_http_memcached_module.o \
  469. objs/src/http/modules/ngx_http_empty_gif_module.o \
  470. objs/src/http/modules/ngx_http_browser_module.o \
  471. objs/src/http/modules/ngx_http_upstream_hash_module.o \
  472. objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
  473. objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
  474. objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
  475. objs/src/http/modules/ngx_http_upstream_zone_module.o \
  476. objs/ngx_modules.o \
  477. -ldl -lpthread -lcrypt -lpcre -lz \
  478. -Wl,-E
  479. sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
  480. -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
  481. -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
  482. -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
  483. < man/nginx.8 > objs/nginx.8
  484. make[1]: Leaving directory `/usr/local/nginx/nginx-1.14.0'

复制代码

安装

make install  (make install是把这些编译出来的可执行文件和库文件复制到合适的地方)

复制代码

  1. [root@instance-3lm099to nginx-1.14.0]# make install
  2. make -f objs/Makefile install
  3. make[1]: Entering directory `/usr/local/nginx/nginx-1.14.0'
  4. test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
  5. test -d '/usr/local/nginx/sbin' \
  6. || mkdir -p '/usr/local/nginx/sbin'
  7. test ! -f '/usr/local/nginx/sbin/nginx' \
  8. || mv '/usr/local/nginx/sbin/nginx' \
  9. '/usr/local/nginx/sbin/nginx.old'
  10. cp objs/nginx '/usr/local/nginx/sbin/nginx'
  11. test -d '/usr/local/nginx/conf' \
  12. || mkdir -p '/usr/local/nginx/conf'
  13. cp conf/koi-win '/usr/local/nginx/conf'
  14. cp conf/koi-utf '/usr/local/nginx/conf'
  15. cp conf/win-utf '/usr/local/nginx/conf'
  16. test -f '/usr/local/nginx/conf/mime.types' \
  17. || cp conf/mime.types '/usr/local/nginx/conf'
  18. cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
  19. test -f '/usr/local/nginx/conf/fastcgi_params' \
  20. || cp conf/fastcgi_params '/usr/local/nginx/conf'
  21. cp conf/fastcgi_params \
  22. '/usr/local/nginx/conf/fastcgi_params.default'
  23. test -f '/usr/local/nginx/conf/fastcgi.conf' \
  24. || cp conf/fastcgi.conf '/usr/local/nginx/conf'
  25. cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'
  26. test -f '/usr/local/nginx/conf/uwsgi_params' \
  27. || cp conf/uwsgi_params '/usr/local/nginx/conf'
  28. cp conf/uwsgi_params \
  29. '/usr/local/nginx/conf/uwsgi_params.default'
  30. test -f '/usr/local/nginx/conf/scgi_params' \
  31. || cp conf/scgi_params '/usr/local/nginx/conf'
  32. cp conf/scgi_params \
  33. '/usr/local/nginx/conf/scgi_params.default'
  34. test -f '/usr/local/nginx/conf/nginx.conf' \
  35. || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'
  36. cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
  37. test -d '/usr/local/nginx/logs' \
  38. || mkdir -p '/usr/local/nginx/logs'
  39. test -d '/usr/local/nginx/logs' \
  40. || mkdir -p '/usr/local/nginx/logs'
  41. test -d '/usr/local/nginx/html' \
  42. || cp -R html '/usr/local/nginx'
  43. test -d '/usr/local/nginx/logs' \
  44. || mkdir -p '/usr/local/nginx/logs'
  45. make[1]: Leaving directory `/usr/local/nginx/nginx-1.14.0'

复制代码

启动

参数 -c 指定了配置文件的路径,如果不加的话就是使用默认的配置文件

[root@instance-3lm099to nginx-1.14.0]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

停止

停止操作是通过向nginx进程发送信号(什么是信号请参阅linux文 章)来进行的

查询nginx主进程号

ps -ef | grep nginx

在进程列表里 面找master进程,它的编号就是主进程号了。

发送信号

从容停止Nginx

kill -QUIT 主进程号

快速停止Nginx

kill -TERM 主进程号

强制停止Nginx

pkill -9 nginx


另外, 若在nginx.conf配置了pid文件存放路径则该文件存放的就是Nginx主进程号,如果没指定则放在nginx的logs目录下。有了pid文 件,我们就不用先查询Nginx的主进程号,而直接向Nginx发送信号了,命令如下:
kill -信号类型 '/usr/nginx/logs/nginx.pid'

平滑重启

如果更改了配置就要重启Nginx,要先关闭Nginx再打开?不是的,可以向Nginx 发送信号,平滑重启。
平滑重启命令:
kill -HUP 主进程号或进程号文件路径

或者使用

/usr/nginx/sbin/nginx -s reload

注意,修改了配置文件后最好先检查一下修改过的配置文件是否正 确,以免重启后Nginx出现错误影响服务器稳定运行。

判断Nginx配置是否正确命令

nginx -t -c /usr/nginx/conf/nginx.conf

或者

/usr/nginx/sbin/nginx -t

如下图:

访问

在浏览器中输入IP:端口号(默认80),出现如下图所示,说明安装成功。

加了中文注解的nginx.conf

复制代码

  1. 1 user www www;
  2. 2 # 工作进程个数,可配置多个
  3. 3 worker_processes auto;
  4. 4
  5. 5 error_log /data/wwwlogs/error_nginx.log crit;
  6. 6 pid /var/run/nginx.pid;
  7. 7 worker_rlimit_nofile 51200;
  8. 8
  9. 9 events {
  10. 10 use epoll;
  11. 11 # 单个进程最大连接数
  12. 12 worker_connections 51200;
  13. 13 multi_accept on;
  14. 14 }
  15. 15
  16. 16 http {
  17. 17 include mime.types;
  18. 18 default_type application/octet-stream;
  19. 19 server_names_hash_bucket_size 128;
  20. 20 client_header_buffer_size 32k;
  21. 21 large_client_header_buffers 4 32k;
  22. 22 client_max_body_size 1024m;
  23. 23 client_body_buffer_size 10m;
  24. 24 sendfile on;
  25. 25 tcp_nopush on;
  26. 26 keepalive_timeout 120;
  27. 27 server_tokens off;
  28. 28 tcp_nodelay on;
  29. 29
  30. 30 fastcgi_connect_timeout 300;
  31. 31 fastcgi_send_timeout 300;
  32. 32 fastcgi_read_timeout 300;
  33. 33 fastcgi_buffer_size 64k;
  34. 34 fastcgi_buffers 4 64k;
  35. 35 fastcgi_busy_buffers_size 128k;
  36. 36 fastcgi_temp_file_write_size 128k;
  37. 37 fastcgi_intercept_errors on;
  38. 38
  39. 39 #Gzip Compression
  40. 40 gzip on;
  41. 41 gzip_buffers 16 8k;
  42. 42 gzip_comp_level 6;
  43. 43 gzip_http_version 1.1;
  44. 44 gzip_min_length 256;
  45. 45 gzip_proxied any;
  46. 46 gzip_vary on;
  47. 47 gzip_types
  48. 48 text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
  49. 49 text/javascript application/javascript application/x-javascript
  50. 50 text/x-json application/json application/x-web-app-manifest+json
  51. 51 text/css text/plain text/x-component
  52. 52 font/opentype application/x-font-ttf application/vnd.ms-fontobject
  53. 53 image/x-icon;
  54. 54 gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  55. 55
  56. 56 #If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
  57. 57 open_file_cache max=1000 inactive=20s;
  58. 58 open_file_cache_valid 30s;
  59. 59 open_file_cache_min_uses 2;
  60. 60 open_file_cache_errors on;
  61. 61
  62. 62 ######################## default ############################
  63. 63 # 服务器集群名称 和下面的location地址对应
  64. 64 upstream myServer {
  65. 65 # weigth参数表示权值,权值越高被分配到的几率越大
  66. 66 # server 127.0.0.1:8080 weight=1;
  67. 67 # server 127.0.0.1:8060 weight=1;
  68. 68 server 47.93.10.184:8080;
  69. 69 server 47.93.10.184:8081;
  70. 70
  71. 71 }
  72. 72
  73. 73 # 每一个server相当于一个代理服务器
  74. 74 server {
  75. 75 # 监听端口,默认80
  76. 76 listen 8848;
  77. 77 # 当前服务的域名,可以有多个,用空格分隔(我们是本地所以是localhost) www.kolbe.cn
  78. 78 server_name localhost;
  79. 79 #server_name _;
  80. 80 access_log /data/wwwlogs/access_nginx.log combined;
  81. 81 root /data/wwwroot/default;
  82. 82 # 当没有指定主页时,默认会选择这个指定的文件,可多个,空格分隔
  83. 83 index index.html index.htm index.php;
  84. 84 # 表示匹配的路径,这时配置了/表示所有请求都被匹配到这里
  85. 85 location / {
  86. 86 # 请求转向自定义的服务器列表
  87. 87 proxy_pass http://myServer;
  88. 88 }
  89. 89 location /nginx_status {
  90. 90 stub_status on;
  91. 91 access_log off;
  92. 92 allow 127.0.0.1;
  93. 93 deny all;
  94. 94 }
  95. 95 location ~ [^/]\.php(/|$) {
  96. 96 #fastcgi_pass remote_php_ip:9000;
  97. 97 fastcgi_pass unix:/dev/shm/php-cgi.sock;
  98. 98 fastcgi_index index.php;
  99. 99 include fastcgi.conf;
  100. 100 }
  101. 101 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
  102. 102 expires 30d;
  103. 103 access_log off;
  104. 104 }
  105. 105 location ~ .*\.(js|css)?$ {
  106. 106 expires 7d;
  107. 107 access_log off;
  108. 108 }
  109. 109 location ~ /\.ht {
  110. 110 deny all;
  111. 111 }
  112. 112 }
  113. 113
  114. 114 ########################## vhost #############################
  115. 115 include vhost/*.conf;
  116. 116 }

复制代码

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/103743
推荐阅读
相关标签
  

闽ICP备14008679号