centos7怎么验证nginx启动成功

2025-05-09 12:36:07

1、1.安装

centos7怎么验证nginx启动成功

2、安装成功后nginx的几个默认目录 输入命令: whereis nginx

centos7怎么验证nginx启动成功

3、查看nginx状态(未启动前) 命令1:systemctl status nginx.service

centos7怎么验证nginx启动成功

4、4.启动、停止、重载命令

centos7怎么验证nginx启动成功

5、5.查看nginx的状态及进程与端口(启动后) 命令1:systemctl status nginx.service

centos7怎么验证nginx启动成功

6、6. 以上nginx就已安装成功了!!!

centos7怎么验证nginx启动成功

7、7.命令2:netstat -antp | grep :80(查看80端口被哪个服务占用)or netstat -antpuel| grep ":22" | grep-v grep(过虑grep本身)

centos7怎么验证nginx启动成功

8、8.命令3:netstat -antp | grep :(查看所有端口占用情况)

centos7怎么验证nginx启动成功

9、9.命令4:ps aux | grep nginx(查看nginx进程运行状态)or ps aux | grep :80 | grep -v grep(过虑grep本身)

centos7怎么验证nginx启动成功

10、10.杀掉进程命令 a)相关nginx进行全部杀掉:killall -9 nginx b)把PID两个进程杀掉:kill -9 pid1 andkill -9 pid1

centos7怎么验证nginx启动成功

11、11.查看版本 命令:nginx -V

centos7怎么验证nginx启动成功
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢