Nginx常用命令
2017-04-25 00:14
246 查看
1、查看当前运行的配置文件
[root@syjmw-app-13 ~]# netstat -anop | grep 0.0.0.0:80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16463/nginx off (0.00/0/0)
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 7815/java off (0.00/0/0)
[root@syjmw-app-13 ~]# ll /proc/16463/exe
lrwxrwxrwx. 1 root root 0 4月 26 04:10 /proc/16463/exe -> /hnisi/local/nginx/nginx
[root@syjmw-app-13 ~]# /hnisi/local/nginx/nginx -t
nginx: the configuration file /hnisi/local/nginx/nginx.conf syntax is ok
nginx: configuration file /hnisi/local/nginx/nginx.conf test is successful
2、查看当前运行nginx的进程号
[root@syjmw-app-13 ~]# ps -ef | grep nginx
root 16463 1 0 Apr25 ? 00:00:00 nginx: master process ./nginx
root 20172 19460 0 19:12 pts/0 00:00:00 grep nginx
nobody 24161 16463 0 Apr25 ? 00:00:18 nginx: worker process
nobody 24162 16463 0 Apr25 ? 00:00:24 nginx: worker process
3、nginx启动、重启、停止命令
从容地重启:kill -HUP pid
启动nginx:./nginx
重启nginx:./nginx -s reload
停止nginx:./nginx -s stop
4、查出nginx的PID->通过PID查出端口号
[root@syjmw-app-13 ~]# ps -ef | grep nginx
root 16463 1 0 Apr25 ? 00:00:00 nginx: master process ./nginx
root 20827 19460 0 19:33 pts/0 00:00:00 grep nginx
nobody 24161 16463 0 Apr25 ? 00:00:18 nginx: worker process
nobody 24162 16463 0 Apr25 ? 00:00:24 nginx: worker process
[root@syjmw-app-13 ~]# netstat -antup | grep 16463
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16463/nginx
[root@syjmw-app-13 ~]# netstat -anop | grep 0.0.0.0:80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16463/nginx off (0.00/0/0)
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 7815/java off (0.00/0/0)
[root@syjmw-app-13 ~]# ll /proc/16463/exe
lrwxrwxrwx. 1 root root 0 4月 26 04:10 /proc/16463/exe -> /hnisi/local/nginx/nginx
[root@syjmw-app-13 ~]# /hnisi/local/nginx/nginx -t
nginx: the configuration file /hnisi/local/nginx/nginx.conf syntax is ok
nginx: configuration file /hnisi/local/nginx/nginx.conf test is successful
2、查看当前运行nginx的进程号
[root@syjmw-app-13 ~]# ps -ef | grep nginx
root 16463 1 0 Apr25 ? 00:00:00 nginx: master process ./nginx
root 20172 19460 0 19:12 pts/0 00:00:00 grep nginx
nobody 24161 16463 0 Apr25 ? 00:00:18 nginx: worker process
nobody 24162 16463 0 Apr25 ? 00:00:24 nginx: worker process
3、nginx启动、重启、停止命令
从容地重启:kill -HUP pid
启动nginx:./nginx
重启nginx:./nginx -s reload
停止nginx:./nginx -s stop
4、查出nginx的PID->通过PID查出端口号
[root@syjmw-app-13 ~]# ps -ef | grep nginx
root 16463 1 0 Apr25 ? 00:00:00 nginx: master process ./nginx
root 20827 19460 0 19:33 pts/0 00:00:00 grep nginx
nobody 24161 16463 0 Apr25 ? 00:00:18 nginx: worker process
nobody 24162 16463 0 Apr25 ? 00:00:24 nginx: worker process
[root@syjmw-app-13 ~]# netstat -antup | grep 16463
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16463/nginx
相关文章推荐
- 高性能Web服务器Nginx的配置与部署研究(4)Nginx常用命令
- CENTOS环境下nginx常用命令及优化--不断更新中
- nginx memcached redis sc 常用命令
- Nginx的常用命令。
- Nginx常用命令
- nginx常用命令
- linux常用命令及 Nginx部署ThinkPHP
- nginx日常维护常用命令
- Nginx的配置与部署4)Nginx常用命令
- (六)Linux环境部署(Centos+Nginx+Tomcat+Mysql) - 常用命令总结
- Nginx安装及配置以及常用命令
- Nginx常用命令
- 简单总结一些Nginx常用命令
- nginx常用命令
- nginx常用命令
- 高性能Web服务器Nginx的配置与部署研究(4)Nginx常用命令
- nginx一些常用命令
- nginx日常维护常用命令
- nginx 常用操作命令
- ubuntu下nginx安装、基本配置及常用命令