码迷,mamicode.com
首页 > 系统相关 > 详细

linux下的apache服务自启动的几种方式

时间:2014-08-14 03:45:27      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:http   使用   os   ar   art   linux   res   ef   

1,如果是安装包安装在Linux系统下,那么可以使用

[root@localhost ~]# service httpd restart

从而可以开启或者重启apache服务

与此同时,它的标准方式是:

[root@localhost ~]# /etc/rc.d/init.d/httpd start

或者[root@localhost ~]# /etc/rc.d/init.d/httpd stop

或者[root@localhost ~]# /etc/rc.d/init.d/httpd restart

 

2,基于xinetd的服务.

通过命令:

[root@localhost ~]# ntsysv

可以设置需要开启的服务

 

3,如果你是通过源码包编译后再安装的软件,那么,需要找到软件所安装的目录位置,在将服务开启

以httpd为例

之前我是通过环境配置

[root@localhost ~]#./configure  --prefix=/usr/local/apache2

设置自己的安装路径,可见以上命令的安装路径是/usr/local/apache2

于是需要

[root@localhost ~]#/usr/local/apache2/bin/apachectl start

此时可以启动httpd服务

 

4,设置自动启动

[root@localhost ~]# chkconfig --level 2345 off|on

通过此种方式可以设置Linux系统开机启动

 

linux下的apache服务自启动的几种方式,布布扣,bubuko.com

linux下的apache服务自启动的几种方式

标签:http   使用   os   ar   art   linux   res   ef   

原文地址:http://www.cnblogs.com/ishenghuo/p/3911569.html

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