httpd基本命令

查看有没有安装包:

#rpm -ql httpd

不加l是查看安装包

 

#yum list installed

 

来查案安装过的包,  +  |grep httpd

#yum list installed | grep httpd

 

 

判断服务有没有起来

#systemctl status httpd

 

从进程上来看    是否有这样的进程

#ps aux | grep httpd

 

来查看有没有80的端口

#ss -tanmlp | grep httpd

 

关掉服务:1

#systemctl stop httpd

查看服务器状态

#systenctl status httpd

2

#sysremctl start httpd

#systemctl status httpd

 

另一种

#ps aux | grep httpd

#kill -9 前段号码

      

 

再来看看进程

failed挂起的状态   停止的状态  ==  关掉  

 

 

关掉以后没有端口号:

#systemctl stop httpd

#ss -tnmlp | grep httpd

此时没有端口号

查看端口号

#ss -tnmlp | grep httpd

 

posted @ 2018-09-12 15:15  梦晚黎  阅读(1099)  评论(0编辑  收藏  举报