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
[root@instance-3lm099to nginx-1.14.0]# ./configure —prefix=/usr/local/nginx
checking for OS
+ Linux 3.10.0-862.3.2.el7.x86_64 x86_64
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
可能会出现这个错误
./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= option.
如果出现了,就执行下这个
[root@instance-3lm099to nginx-1.14.0]# yum -y install openssl openssl-devel
再次执行
linux 安装 nginx - 图1
[root@instance-3lm099to nginx-1.14.0]# ./configure —prefix=/usr/local/nginx
checking for OS
+ Linux 3.10.0-862.3.2.el7.x86_64 x86_64
checking for C compiler … found
+ using GNU C compiler
+ gcc version: 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
checking for gcc -pipe switch … found
checking for -Wl,-E switch … found
checking for gcc builtin atomic operations … found
checking for C99 variadic macros … found
checking for gcc variadic macros … found
checking for gcc builtin 64 bit byteswap … found
checking for unistd.h … found
checking for inttypes.h … found
checking for limits.h … found
checking for sys/filio.h … not found
checking for sys/param.h … found
checking for sys/mount.h … found
checking for sys/statvfs.h … found
checking for crypt.h … found
checking for Linux specific features
checking for epoll … found
checking for EPOLLRDHUP … found
checking for EPOLLEXCLUSIVE … not found
checking for O_PATH … found
checking for sendfile() … found
checking for sendfile64() … found
checking for sys/prctl.h … found
checking for prctl(PR_SET_DUMPABLE) … found
checking for prctl(PR_SET_KEEPCAPS) … found
checking for capabilities … found
checking for crypt_r() … found
checking for sys/vfs.h … found
checking for nobody group … found
checking for poll() … found
checking for /dev/poll … not found
checking for kqueue … not found
checking for crypt() … not found
checking for crypt() in libcrypt … found
checking for F_READAHEAD … not found
checking for posix_fadvise() … found
checking for O_DIRECT … found
checking for F_NOCACHE … not found
checking for directio() … not found
checking for statfs() … found
checking for statvfs() … found
checking for dlopen() … not found
checking for dlopen() in libdl … found
checking for sched_yield() … found
checking for sched_setaffinity() … found
checking for SO_SETFIB … not found
checking for SO_REUSEPORT … found
checking for SO_ACCEPTFILTER … not found
checking for SO_BINDANY … not found
checking for IP_TRANSPARENT … found
checking for IP_BINDANY … not found
checking for IP_BIND_ADDRESS_NO_PORT … not found
checking for IP_RECVDSTADDR … not found
checking for IP_SENDSRCADDR … not found
checking for IP_PKTINFO … found
checking for IPV6_RECVPKTINFO … found
checking for TCP_DEFER_ACCEPT … found
checking for TCP_KEEPIDLE … found
checking for TCP_FASTOPEN … found
checking for TCP_INFO … found
checking for accept4() … found
checking for eventfd() … found
checking for int size … 4 bytes
checking for long size … 8 bytes
checking for long long size … 8 bytes
checking for void * size … 8 bytes
checking for uint32_t … found
checking for uint64_t … found
checking for sig_atomic_t … found
checking for sig_atomic_t size … 4 bytes
checking for socklen_t … found
checking for in_addr_t … found
checking for in_port_t … found
checking for rlim_t … found
checking for uintptr_t … uintptr_t found
checking for system byte ordering … little endian
checking for size_t size … 8 bytes
checking for off_t size … 8 bytes
checking for time_t size … 8 bytes
checking for AF_INET6 … found
checking for setproctitle() … not found
checking for pread() … found
checking for pwrite() … found
checking for pwritev() … found
checking for sys_nerr … found
checking for localtime_r() … found
checking for clock_gettime(CLOCK_MONOTONIC) … found
checking for posix_memalign() … found
checking for memalign() … found
checking for mmap(MAP_ANON|MAP_SHARED) … found
checking for mmap(“/dev/zero”, MAP_SHARED) … found
checking for System V shared memory … found
checking for POSIX semaphores … not found
checking for POSIX semaphores in libpthread … found
checking for struct msghdr.msg_control … found
checking for ioctl(FIONBIO) … found
checking for struct tm.tm_gmtoff … found
checking for struct dirent.d_namlen … not found
checking for struct dirent.d_type … found
checking for sysconf(_SC_NPROCESSORS_ONLN) … found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) … found
checking for openat(), fstatat() … found
checking for getaddrinfo() … found
checking for PCRE library … found
checking for PCRE JIT support … found
checking for zlib library … found
creating objs/Makefile

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library

nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/nginx/sbin/nginx”
nginx modules path: “/usr/local/nginx/modules”
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”
linux 安装 nginx - 图2

编译

make (make的过程是把各种语言写的源码文件,变成可执行文件和各种库文件)
linux 安装 nginx - 图3
[root@instance-3lm099to nginx-1.14.0]# make
make -f objs/Makefile
make[1]: Entering directory /usr/local/nginx/nginx-1.14.0'<br />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 \<br /> -o objs/src/core/nginx.o \<br /> src/core/nginx.c<br />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 \<br /> -o objs/src/core/ngx_log.o \<br /> src/core/ngx_log.c<br />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 \<br /> -o objs/src/core/ngx_palloc.o \<br /> src/core/ngx_palloc.c<br />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 \<br /> -o objs/src/core/ngx_array.o \<br /> src/core/ngx_array.c<br />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 \<br /> -o objs/src/core/ngx_list.o \<br /> src/core/ngx_list.c<br />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 \<br /> -o objs/src/core/ngx_hash.o \<br /> src/core/ngx_hash.c<br />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 \<br /> -o objs/src/core/ngx_buf.o \<br /> src/core/ngx_buf.c<br />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 \<br /> -o objs/src/core/ngx_queue.o \<br /> src/core/ngx_queue.c<br />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 \<br /> -o objs/src/core/ngx_output_chain.o \<br /> src/core/ngx_output_chain.c<br />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 \<br /> -o objs/src/core/ngx_string.o \<br /> src/core/ngx_string.c<br />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 \<br /> -o objs/src/core/ngx_parse.o \<br /> src/core/ngx_parse.c<br />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 \<br /> -o objs/src/core/ngx_parse_time.o \<br /> src/core/ngx_parse_time.c<br />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 \<br /> -o objs/src/core/ngx_inet.o \<br /> src/core/ngx_inet.c<br />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 \<br /> -o objs/src/core/ngx_file.o \<br /> src/core/ngx_file.c<br />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 \<br /> -o objs/src/core/ngx_crc32.o \<br /> src/core/ngx_crc32.c<br />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 \<br /> -o objs/src/core/ngx_murmurhash.o \<br /> src/core/ngx_murmurhash.c<br />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 \<br /> -o objs/src/core/ngx_md5.o \<br /> src/core/ngx_md5.c<br />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 \<br /> -o objs/src/core/ngx_sha1.o \<br /> src/core/ngx_sha1.c<br />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 \<br /> -o objs/src/core/ngx_rbtree.o \<br /> src/core/ngx_rbtree.c<br />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 \<br /> -o objs/src/core/ngx_radix_tree.o \<br /> src/core/ngx_radix_tree.c<br />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 \<br /> -o objs/src/core/ngx_slab.o \<br /> src/core/ngx_slab.c<br />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 \<br /> -o objs/src/core/ngx_times.o \<br /> src/core/ngx_times.c<br />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 \<br /> -o objs/src/core/ngx_shmtx.o \<br /> src/core/ngx_shmtx.c<br />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 \<br /> -o objs/src/core/ngx_connection.o \<br /> src/core/ngx_connection.c<br />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 \<br /> -o objs/src/core/ngx_cycle.o \<br /> src/core/ngx_cycle.c<br />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 \<br /> -o objs/src/core/ngx_spinlock.o \<br /> src/core/ngx_spinlock.c<br />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 \<br /> -o objs/src/core/ngx_rwlock.o \<br /> src/core/ngx_rwlock.c<br />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 \<br /> -o objs/src/core/ngx_cpuinfo.o \<br /> src/core/ngx_cpuinfo.c<br />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 \<br /> -o objs/src/core/ngx_conf_file.o \<br /> src/core/ngx_conf_file.c<br />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 \<br /> -o objs/src/core/ngx_module.o \<br /> src/core/ngx_module.c<br />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 \<br /> -o objs/src/core/ngx_resolver.o \<br /> src/core/ngx_resolver.c<br />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 \<br /> -o objs/src/core/ngx_open_file_cache.o \<br /> src/core/ngx_open_file_cache.c<br />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 \<br /> -o objs/src/core/ngx_crypt.o \<br /> src/core/ngx_crypt.c<br />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 \<br /> -o objs/src/core/ngx_proxy_protocol.o \<br /> src/core/ngx_proxy_protocol.c<br />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 \<br /> -o objs/src/core/ngx_syslog.o \<br /> src/core/ngx_syslog.c<br />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 \<br /> -o objs/src/event/ngx_event.o \<br /> src/event/ngx_event.c<br />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 \<br /> -o objs/src/event/ngx_event_timer.o \<br /> src/event/ngx_event_timer.c<br />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 \<br /> -o objs/src/event/ngx_event_posted.o \<br /> src/event/ngx_event_posted.c<br />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 \<br /> -o objs/src/event/ngx_event_accept.o \<br /> src/event/ngx_event_accept.c<br />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 \<br /> -o objs/src/event/ngx_event_connect.o \<br /> src/event/ngx_event_connect.c<br />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 \<br /> -o objs/src/event/ngx_event_pipe.o \<br /> src/event/ngx_event_pipe.c<br />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 \<br /> -o objs/src/os/unix/ngx_time.o \<br /> src/os/unix/ngx_time.c<br />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 \<br /> -o objs/src/os/unix/ngx_errno.o \<br /> src/os/unix/ngx_errno.c<br />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 \<br /> -o objs/src/os/unix/ngx_alloc.o \<br /> src/os/unix/ngx_alloc.c<br />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 \<br /> -o objs/src/os/unix/ngx_files.o \<br /> src/os/unix/ngx_files.c<br />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 \<br /> -o objs/src/os/unix/ngx_socket.o \<br /> src/os/unix/ngx_socket.c<br />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 \<br /> -o objs/src/os/unix/ngx_recv.o \<br /> src/os/unix/ngx_recv.c<br />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 \<br /> -o objs/src/os/unix/ngx_readv_chain.o \<br /> src/os/unix/ngx_readv_chain.c<br />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 \<br /> -o objs/src/os/unix/ngx_udp_recv.o \<br /> src/os/unix/ngx_udp_recv.c<br />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 \<br /> -o objs/src/os/unix/ngx_send.o \<br /> src/os/unix/ngx_send.c<br />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 \<br /> -o objs/src/os/unix/ngx_writev_chain.o \<br /> src/os/unix/ngx_writev_chain.c<br />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 \<br /> -o objs/src/os/unix/ngx_udp_send.o \<br /> src/os/unix/ngx_udp_send.c<br />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 \<br /> -o objs/src/os/unix/ngx_udp_sendmsg_chain.o \<br /> src/os/unix/ngx_udp_sendmsg_chain.c<br />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 \<br /> -o objs/src/os/unix/ngx_channel.o \<br /> src/os/unix/ngx_channel.c<br />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 \<br /> -o objs/src/os/unix/ngx_shmem.o \<br /> src/os/unix/ngx_shmem.c<br />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 \<br /> -o objs/src/os/unix/ngx_process.o \<br /> src/os/unix/ngx_process.c<br />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 \<br /> -o objs/src/os/unix/ngx_daemon.o \<br /> src/os/unix/ngx_daemon.c<br />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 \<br /> -o objs/src/os/unix/ngx_setaffinity.o \<br /> src/os/unix/ngx_setaffinity.c<br />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 \<br /> -o objs/src/os/unix/ngx_setproctitle.o \<br /> src/os/unix/ngx_setproctitle.c<br />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 \<br /> -o objs/src/os/unix/ngx_posix_init.o \<br /> src/os/unix/ngx_posix_init.c<br />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 \<br /> -o objs/src/os/unix/ngx_user.o \<br /> src/os/unix/ngx_user.c<br />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 \<br /> -o objs/src/os/unix/ngx_dlopen.o \<br /> src/os/unix/ngx_dlopen.c<br />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 \<br /> -o objs/src/os/unix/ngx_process_cycle.o \<br /> src/os/unix/ngx_process_cycle.c<br />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 \<br /> -o objs/src/os/unix/ngx_linux_init.o \<br /> src/os/unix/ngx_linux_init.c<br />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 \<br /> -o objs/src/event/modules/ngx_epoll_module.o \<br /> src/event/modules/ngx_epoll_module.c<br />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 \<br /> -o objs/src/os/unix/ngx_linux_sendfile_chain.o \<br /> src/os/unix/ngx_linux_sendfile_chain.c<br />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 \<br /> -o objs/src/core/ngx_regex.o \<br /> src/core/ngx_regex.c<br />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 \<br /> -o objs/src/http/ngx_http.o \<br /> src/http/ngx_http.c<br />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 \<br /> -o objs/src/http/ngx_http_core_module.o \<br /> src/http/ngx_http_core_module.c<br />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 \<br /> -o objs/src/http/ngx_http_special_response.o \<br /> src/http/ngx_http_special_response.c<br />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 \<br /> -o objs/src/http/ngx_http_request.o \<br /> src/http/ngx_http_request.c<br />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 \<br /> -o objs/src/http/ngx_http_parse.o \<br /> src/http/ngx_http_parse.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_log_module.o \<br /> src/http/modules/ngx_http_log_module.c<br />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 \<br /> -o objs/src/http/ngx_http_request_body.o \<br /> src/http/ngx_http_request_body.c<br />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 \<br /> -o objs/src/http/ngx_http_variables.o \<br /> src/http/ngx_http_variables.c<br />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 \<br /> -o objs/src/http/ngx_http_script.o \<br /> src/http/ngx_http_script.c<br />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 \<br /> -o objs/src/http/ngx_http_upstream.o \<br /> src/http/ngx_http_upstream.c<br />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 \<br /> -o objs/src/http/ngx_http_upstream_round_robin.o \<br /> src/http/ngx_http_upstream_round_robin.c<br />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 \<br /> -o objs/src/http/ngx_http_file_cache.o \<br /> src/http/ngx_http_file_cache.c<br />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 \<br /> -o objs/src/http/ngx_http_write_filter_module.o \<br /> src/http/ngx_http_write_filter_module.c<br />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 \<br /> -o objs/src/http/ngx_http_header_filter_module.o \<br /> src/http/ngx_http_header_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_chunked_filter_module.o \<br /> src/http/modules/ngx_http_chunked_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_range_filter_module.o \<br /> src/http/modules/ngx_http_range_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_gzip_filter_module.o \<br /> src/http/modules/ngx_http_gzip_filter_module.c<br />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 \<br /> -o objs/src/http/ngx_http_postpone_filter_module.o \<br /> src/http/ngx_http_postpone_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_ssi_filter_module.o \<br /> src/http/modules/ngx_http_ssi_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_charset_filter_module.o \<br /> src/http/modules/ngx_http_charset_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_userid_filter_module.o \<br /> src/http/modules/ngx_http_userid_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_headers_filter_module.o \<br /> src/http/modules/ngx_http_headers_filter_module.c<br />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 \<br /> -o objs/src/http/ngx_http_copy_filter_module.o \<br /> src/http/ngx_http_copy_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_not_modified_filter_module.o \<br /> src/http/modules/ngx_http_not_modified_filter_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_static_module.o \<br /> src/http/modules/ngx_http_static_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_autoindex_module.o \<br /> src/http/modules/ngx_http_autoindex_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_index_module.o \<br /> src/http/modules/ngx_http_index_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_mirror_module.o \<br /> src/http/modules/ngx_http_mirror_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_try_files_module.o \<br /> src/http/modules/ngx_http_try_files_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_auth_basic_module.o \<br /> src/http/modules/ngx_http_auth_basic_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_access_module.o \<br /> src/http/modules/ngx_http_access_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_limit_conn_module.o \<br /> src/http/modules/ngx_http_limit_conn_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_limit_req_module.o \<br /> src/http/modules/ngx_http_limit_req_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_geo_module.o \<br /> src/http/modules/ngx_http_geo_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_map_module.o \<br /> src/http/modules/ngx_http_map_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_split_clients_module.o \<br /> src/http/modules/ngx_http_split_clients_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_referer_module.o \<br /> src/http/modules/ngx_http_referer_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_rewrite_module.o \<br /> src/http/modules/ngx_http_rewrite_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_proxy_module.o \<br /> src/http/modules/ngx_http_proxy_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_fastcgi_module.o \<br /> src/http/modules/ngx_http_fastcgi_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_uwsgi_module.o \<br /> src/http/modules/ngx_http_uwsgi_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_scgi_module.o \<br /> src/http/modules/ngx_http_scgi_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_memcached_module.o \<br /> src/http/modules/ngx_http_memcached_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_empty_gif_module.o \<br /> src/http/modules/ngx_http_empty_gif_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_browser_module.o \<br /> src/http/modules/ngx_http_browser_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_upstream_hash_module.o \<br /> src/http/modules/ngx_http_upstream_hash_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \<br /> src/http/modules/ngx_http_upstream_ip_hash_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_upstream_least_conn_module.o \<br /> src/http/modules/ngx_http_upstream_least_conn_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \<br /> src/http/modules/ngx_http_upstream_keepalive_module.c<br />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 \<br /> -o objs/src/http/modules/ngx_http_upstream_zone_module.o \<br /> src/http/modules/ngx_http_upstream_zone_module.c<br />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 \<br /> -o objs/ngx_modules.o \<br /> objs/ngx_modules.c<br />cc -o objs/nginx \<br />objs/src/core/nginx.o \<br />objs/src/core/ngx_log.o \<br />objs/src/core/ngx_palloc.o \<br />objs/src/core/ngx_array.o \<br />objs/src/core/ngx_list.o \<br />objs/src/core/ngx_hash.o \<br />objs/src/core/ngx_buf.o \<br />objs/src/core/ngx_queue.o \<br />objs/src/core/ngx_output_chain.o \<br />objs/src/core/ngx_string.o \<br />objs/src/core/ngx_parse.o \<br />objs/src/core/ngx_parse_time.o \<br />objs/src/core/ngx_inet.o \<br />objs/src/core/ngx_file.o \<br />objs/src/core/ngx_crc32.o \<br />objs/src/core/ngx_murmurhash.o \<br />objs/src/core/ngx_md5.o \<br />objs/src/core/ngx_sha1.o \<br />objs/src/core/ngx_rbtree.o \<br />objs/src/core/ngx_radix_tree.o \<br />objs/src/core/ngx_slab.o \<br />objs/src/core/ngx_times.o \<br />objs/src/core/ngx_shmtx.o \<br />objs/src/core/ngx_connection.o \<br />objs/src/core/ngx_cycle.o \<br />objs/src/core/ngx_spinlock.o \<br />objs/src/core/ngx_rwlock.o \<br />objs/src/core/ngx_cpuinfo.o \<br />objs/src/core/ngx_conf_file.o \<br />objs/src/core/ngx_module.o \<br />objs/src/core/ngx_resolver.o \<br />objs/src/core/ngx_open_file_cache.o \<br />objs/src/core/ngx_crypt.o \<br />objs/src/core/ngx_proxy_protocol.o \<br />objs/src/core/ngx_syslog.o \<br />objs/src/event/ngx_event.o \<br />objs/src/event/ngx_event_timer.o \<br />objs/src/event/ngx_event_posted.o \<br />objs/src/event/ngx_event_accept.o \<br />objs/src/event/ngx_event_connect.o \<br />objs/src/event/ngx_event_pipe.o \<br />objs/src/os/unix/ngx_time.o \<br />objs/src/os/unix/ngx_errno.o \<br />objs/src/os/unix/ngx_alloc.o \<br />objs/src/os/unix/ngx_files.o \<br />objs/src/os/unix/ngx_socket.o \<br />objs/src/os/unix/ngx_recv.o \<br />objs/src/os/unix/ngx_readv_chain.o \<br />objs/src/os/unix/ngx_udp_recv.o \<br />objs/src/os/unix/ngx_send.o \<br />objs/src/os/unix/ngx_writev_chain.o \<br />objs/src/os/unix/ngx_udp_send.o \<br />objs/src/os/unix/ngx_udp_sendmsg_chain.o \<br />objs/src/os/unix/ngx_channel.o \<br />objs/src/os/unix/ngx_shmem.o \<br />objs/src/os/unix/ngx_process.o \<br />objs/src/os/unix/ngx_daemon.o \<br />objs/src/os/unix/ngx_setaffinity.o \<br />objs/src/os/unix/ngx_setproctitle.o \<br />objs/src/os/unix/ngx_posix_init.o \<br />objs/src/os/unix/ngx_user.o \<br />objs/src/os/unix/ngx_dlopen.o \<br />objs/src/os/unix/ngx_process_cycle.o \<br />objs/src/os/unix/ngx_linux_init.o \<br />objs/src/event/modules/ngx_epoll_module.o \<br />objs/src/os/unix/ngx_linux_sendfile_chain.o \<br />objs/src/core/ngx_regex.o \<br />objs/src/http/ngx_http.o \<br />objs/src/http/ngx_http_core_module.o \<br />objs/src/http/ngx_http_special_response.o \<br />objs/src/http/ngx_http_request.o \<br />objs/src/http/ngx_http_parse.o \<br />objs/src/http/modules/ngx_http_log_module.o \<br />objs/src/http/ngx_http_request_body.o \<br />objs/src/http/ngx_http_variables.o \<br />objs/src/http/ngx_http_script.o \<br />objs/src/http/ngx_http_upstream.o \<br />objs/src/http/ngx_http_upstream_round_robin.o \<br />objs/src/http/ngx_http_file_cache.o \<br />objs/src/http/ngx_http_write_filter_module.o \<br />objs/src/http/ngx_http_header_filter_module.o \<br />objs/src/http/modules/ngx_http_chunked_filter_module.o \<br />objs/src/http/modules/ngx_http_range_filter_module.o \<br />objs/src/http/modules/ngx_http_gzip_filter_module.o \<br />objs/src/http/ngx_http_postpone_filter_module.o \<br />objs/src/http/modules/ngx_http_ssi_filter_module.o \<br />objs/src/http/modules/ngx_http_charset_filter_module.o \<br />objs/src/http/modules/ngx_http_userid_filter_module.o \<br />objs/src/http/modules/ngx_http_headers_filter_module.o \<br />objs/src/http/ngx_http_copy_filter_module.o \<br />objs/src/http/modules/ngx_http_not_modified_filter_module.o \<br />objs/src/http/modules/ngx_http_static_module.o \<br />objs/src/http/modules/ngx_http_autoindex_module.o \<br />objs/src/http/modules/ngx_http_index_module.o \<br />objs/src/http/modules/ngx_http_mirror_module.o \<br />objs/src/http/modules/ngx_http_try_files_module.o \<br />objs/src/http/modules/ngx_http_auth_basic_module.o \<br />objs/src/http/modules/ngx_http_access_module.o \<br />objs/src/http/modules/ngx_http_limit_conn_module.o \<br />objs/src/http/modules/ngx_http_limit_req_module.o \<br />objs/src/http/modules/ngx_http_geo_module.o \<br />objs/src/http/modules/ngx_http_map_module.o \<br />objs/src/http/modules/ngx_http_split_clients_module.o \<br />objs/src/http/modules/ngx_http_referer_module.o \<br />objs/src/http/modules/ngx_http_rewrite_module.o \<br />objs/src/http/modules/ngx_http_proxy_module.o \<br />objs/src/http/modules/ngx_http_fastcgi_module.o \<br />objs/src/http/modules/ngx_http_uwsgi_module.o \<br />objs/src/http/modules/ngx_http_scgi_module.o \<br />objs/src/http/modules/ngx_http_memcached_module.o \<br />objs/src/http/modules/ngx_http_empty_gif_module.o \<br />objs/src/http/modules/ngx_http_browser_module.o \<br />objs/src/http/modules/ngx_http_upstream_hash_module.o \<br />objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \<br />objs/src/http/modules/ngx_http_upstream_least_conn_module.o \<br />objs/src/http/modules/ngx_http_upstream_keepalive_module.o \<br />objs/src/http/modules/ngx_http_upstream_zone_module.o \<br />objs/ngx_modules.o \<br />-ldl -lpthread -lcrypt -lpcre -lz \<br />-Wl,-E<br />sed -e "s|%%PREFIX%%|/usr/local/nginx|" \<br /> -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \<br /> -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \<br /> -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \<br /> < man/nginx.8 > objs/nginx.8<br />make[1]: Leaving directory/usr/local/nginx/nginx-1.14.0’
linux 安装 nginx - 图4

安装

make install (make install是把这些编译出来的可执行文件和库文件复制到合适的地方)
linux 安装 nginx - 图5
[root@instance-3lm099to nginx-1.14.0]# make install
make -f objs/Makefile install
make[1]: Entering directory /usr/local/nginx/nginx-1.14.0'<br />test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'<br />test -d '/usr/local/nginx/sbin' \<br /> || mkdir -p '/usr/local/nginx/sbin'<br />test ! -f '/usr/local/nginx/sbin/nginx' \<br /> || mv '/usr/local/nginx/sbin/nginx' \<br /> '/usr/local/nginx/sbin/nginx.old'<br />cp objs/nginx '/usr/local/nginx/sbin/nginx'<br />test -d '/usr/local/nginx/conf' \<br /> || mkdir -p '/usr/local/nginx/conf'<br />cp conf/koi-win '/usr/local/nginx/conf'<br />cp conf/koi-utf '/usr/local/nginx/conf'<br />cp conf/win-utf '/usr/local/nginx/conf'<br />test -f '/usr/local/nginx/conf/mime.types' \<br /> || cp conf/mime.types '/usr/local/nginx/conf'<br />cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'<br />test -f '/usr/local/nginx/conf/fastcgi_params' \<br /> || cp conf/fastcgi_params '/usr/local/nginx/conf'<br />cp conf/fastcgi_params \<br /> '/usr/local/nginx/conf/fastcgi_params.default'<br />test -f '/usr/local/nginx/conf/fastcgi.conf' \<br /> || cp conf/fastcgi.conf '/usr/local/nginx/conf'<br />cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'<br />test -f '/usr/local/nginx/conf/uwsgi_params' \<br /> || cp conf/uwsgi_params '/usr/local/nginx/conf'<br />cp conf/uwsgi_params \<br /> '/usr/local/nginx/conf/uwsgi_params.default'<br />test -f '/usr/local/nginx/conf/scgi_params' \<br /> || cp conf/scgi_params '/usr/local/nginx/conf'<br />cp conf/scgi_params \<br /> '/usr/local/nginx/conf/scgi_params.default'<br />test -f '/usr/local/nginx/conf/nginx.conf' \<br /> || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'<br />cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'<br />test -d '/usr/local/nginx/logs' \<br /> || mkdir -p '/usr/local/nginx/logs'<br />test -d '/usr/local/nginx/logs' \<br /> || mkdir -p '/usr/local/nginx/logs'<br />test -d '/usr/local/nginx/html' \<br /> || cp -R html '/usr/local/nginx'<br />test -d '/usr/local/nginx/logs' \<br /> || mkdir -p '/usr/local/nginx/logs'<br />make[1]: Leaving directory/usr/local/nginx/nginx-1.14.0’
linux 安装 nginx - 图6

启动

参数 -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

如下图:
linux 安装 nginx - 图7

访问

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

加了中文注解的nginx.conf

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