码迷,mamicode.com
首页 > Web开发 > 详细

查看CentOS上Apache位置,版本,停止,启动

时间:2017-05-31 13:56:18      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:uil   roo   str   nbsp   技术分享   centos6   ice   apach   ini   

 

查看Apache是否被安装:

[root@centos64 ~]# find / -name ‘httpd‘
/usr/sbin/httpd
/usr/lib64/httpd
/var/run/httpd
/var/log/httpd
/var/lock/subsys/httpd
/etc/logrotate.d/httpd
/etc/httpd
/etc/sysconfig/httpd
/etc/rc.d/init.d/httpd

由此确定Apache被安装的地方是/etc/httpd

查看Apache版本

首先进入httpd所在目录

[root@centos64 ~]# cd /etc/httpd

进而查看版本

[root@centos64 httpd]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Mar 22 2017 06:52:55

停止httpd
[root@asg11 httpd]# service httpd stop
Stopping httpd: [  OK  ]

 

启动httpd
[root@asg11 httpd]# service httpd start
Starting httpd: [  OK  ]

 

用浏览器访问试试:

技术分享

Apache的重要配置文件httpd.conf的位置在/etc/httpd/conf/httpd.conf

查看CentOS上Apache位置,版本,停止,启动

标签:uil   roo   str   nbsp   技术分享   centos6   ice   apach   ini   

原文地址:http://www.cnblogs.com/hltswd/p/6923395.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!