我希望在增加nginx中的文件描述符限制后重新启动/etc/security/limits.d/nginx.conf,并且需要重新启动nginx进程以使更改生效。
我应该使用$/sbin/restart nginx还是$service nginx restart,区别是什么?
作为参考,/sbin/restart是什么:
$ /sbin/restart --help
Usage: restart [OPTION]... JOB [KEY=VALUE]...
Restart job.
Options:
-n, --no-wait do not wait for job to restart before exiting
--system use D-Bus system bus to connect to init daemon
--dest=NAME destination well-known name on system bus
-q, --quiet reduce output to errors only
-v, --verbose increase output to include informational messages
--help display this help and exit
--version output version information and exit
JOB is the name of the job that is to be restarted, this may be followed by zero or more environment variables to be defined in the job after
restarting.
The environment also serves to distinguish between job instances, and thus decide which of multiple instances will be restarted.
Report bugs at <https://launchpad.net/upstart/+bugs>发布于 2020-05-21 19:07:35
使用sbin/nginx,您可以直接向nginx发送命令。
服务也这样做(检查屏幕截图):

在我的ubuntu服务器上,我没有/sbin/restart,如果您有它,请尝试执行cat /sbin/restart。
https://stackoverflow.com/questions/61941950
复制相似问题