Nginx编译安装以及选项(3)

--add-module=PATH                  enable external module
  --add-dynamic-module=PATH          enable dynamic external module

--with-compat                      dynamic modules compatibility

--with-cc=PATH                    set C compiler pathname
  --with-cpp=PATH                    set C preprocessor pathname
  --with-cc-opt=OPTIONS              set additional C compiler options
  --with-ld-opt=OPTIONS              set additional linker options
  --with-cpu-opt=CPU                build for the specified CPU, valid values:
                                    pentium, pentiumpro, pentium3, pentium4,
                                    athlon, opteron, sparc32, sparc64, ppc64

--without-pcre                    disable PCRE library usage
  --with-pcre                          force PCRE library usage
  --with-pcre=DIR                  set path to PCRE library sources
  --with-pcre-opt=OPTIONS  set additional build options for PCRE
  --with-pcre-jit                      build PCRE with JIT compilation support

--with-zlib=DIR                            set path to zlib library sources
  --with-zlib-opt=OPTIONS            set additional build options for zlib
  --with-zlib-asm=CPU                  use zlib assembler sources optimized  for the specified CPU, valid values: pentium, pentiumpro

--with-libatomic                  force libatomic_ops library usage
  --with-libatomic=DIR          set path to libatomic_ops library sources

--with-openssl=DIR                        set path to OpenSSL library sources
  --with-openssl-opt=OPTIONS        set additional build options for OpenSSL

--with-debug                      enable debug logging

3、编译安装

[root@www nginx-1.14.0]# ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx-1.14.0 \
> --with-http_ssl_module --with-http_stub_status_module
[root@www nginx-1.14.0]# make && make install

4、控制Nginx服务

启动
[root@www sbin]# /usr/local/nginx-1.14.0/sbin/nginx
[root@www sbin]# ps -aux |grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root      9699  0.0  0.1  46860  1192 ?        Ss  21:52  0:00 nginx: master process /usr/local/nginx-1.14.0/sbin/nginx
nginx      9700  0.0  0.1  47292  1772 ?        S    21:52  0:00 nginx: worker process
存在两个进程:
1、master进程
2、工作进程

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6e89c527fff6399158226ac4a2aea661.html