Linux怎么查看WEB服务器安装没有

Linux怎么查看WEB服务器安装没有

楼下两位的答案只适用于web服务器监听80端口,且WEB服务已经启动
你可以尝试分别输入 nginx / tomcat / httpd / apache / lighttpd 命令看看,目前linux主要就这几种WEB服务器

或者尝试whereis nginx
或者 ps auxwww | grep nginx

如果是debian /ubuntu 系统,可以通过 dpkg -l | grep nginx ...查询是否已经安装
如果是centos / redhat ..系统 ,可以通过 rpm -qa|grep nginx ...查询是否已经安装
温馨提示:内容为网友见解,仅供参考
第1个回答  2013-08-29
首先问下你的是什么发行版本的Linux啊?如果是RHEL/CENTOS这类的利用系统安装的,可以运行命令:service httpd restart 来看看是不是有这个httpd服务器,如果你是其他版本就不一样了。也可以用whereis httpd查找一下,同理nginx,也可以用whereis nginx试试。
第2个回答  2013-08-29
浏览器访问 http://127.0.0.1/ 看时候有正确的web服务程序提示界面弹出即可
第3个回答  2013-08-29
curl --head 网站域名

如 [root@CentOS5 yum.repos.d]# curl --head
www.sina.com
HTTP/1.0 200 OK
Date: Sun, 23 Aug 2009 05:42:19 GMT
Server: Apache/2.0.61 (Unix)
Last-Modified: Sun, 23 Aug 2009 05:40:04 GMT
Accept-Ranges: bytes
X-Powered-By: mod_xlayout_jh/0.0.1vhs.markIII.remix
Cache-Control: max-age=60
Expires: Sun, 23 Aug 2009 05:43:19 GMT
Vary: Accept-Encoding
X-UA-Compatible: IE=EmulateIE7
Content-Type: text/html
Age: 23
Content-Length: 439868
X-Cache: HIT from 236-50.D07071991.sina.com.cn
Connection: close

这样就知道新浪网web用的是 Apache服务器
第4个回答  2018-05-14
可以使用sudo service apache2 start,如果没有提示,则证明安装了WEB服务器,具体的还可以查看 /etc/apache2/ports.conf,如果有相关的目录,并且配置都正常的话,也可以证明安装了WEB服务器,另外还可以打开浏览器输入:http://127.0.0.1:端口号,如果看到测试页,也可以证明的。
相似回答