[root@node21 ~]# ./nginx -h
nginx version: nginx/1.18.0
Usage: nginx [-?hvVtTq][-s signal][-c filename][-p prefix][-g directives]
Options:
-?,-h : this help
-v : show version and exit-V : show version and configure options then exit-t : test configuration and exit-T : test configuration, dump it and exit-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /data/nginx/nginx-1.18.0/) <== 有默认值的哈
-c filename : set configuration file (default: conf/nginx.conf) <== 有默认值的哈
-g directives : set global directives out of configuration file
-c参数的默认值不是一个完整的路径,那么它就是编译安装的。
以yum安装的为例
[root@node21 ~]# nginx -h
nginx version: nginx/1.16.0
Usage: nginx [-?hvVtTq][-s signal][-c filename][-p prefix][-g directives]
Options:
-?,-h : this help
-v : show version and exit-V : show version and configure options then exit-t : test configuration and exit-T : test configuration, dump it and exit-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /etc/nginx/) <== 有默认值的哈
-c filename : set configuration file (default: /etc/nginx/nginx.conf) <== 有默认值的哈
-g directives : set global directives out of configuration file
从哪可以看出来它是yum安装(非编译安装)的呢,就是-c参数的默认值它是一个完整的路径