查询nginx主进程
ps -ef | grep nginx
得到的结果

第二列就是pid
根据pid关闭进程
kill pid
ps -ef | grep nginx
得到的结果

第二列就是pid
kill pid