linux下Apache简介

来源:互联网 发布:java分布式缓存技术 编辑:程序博客网 时间:2024/06/07 17:01

一、基本操作方法

本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况

1、apahce启动命令:

推荐/usr/local/apache2/bin/apachectl start apaceh启动

2、apache停止命令

/usr/local/apache2/bin/apachectl stop   停止

3、apache重新启动命令:

/usr/local/apache2/bin/apachectl restart 重启

4、要在重启 Apache服务器时不中断当前的连接,则应运行:

/usr/local/sbin/apachectl graceful

如果apache安装成为linux的服务的话,可以用以下命令操作:

service httpd start 启动

service httpd restart 重新启动

service httpd stop 停止服务

5、grep Apache服务

ps -ef | grep httpd

6、kill Apache服务

kill -9 pid号(逐个删除)

Linux系统为Ubuntu

1、StartApache 2 Server /启动apache服务

# /etc/init.d/apache2 start

or

$ sudo /etc/init.d/apache2 start

2、RestartApache 2 Server /重启apache服务

# /etc/init.d/apache2 restart

or

$ sudo /etc/init.d/apache2 restart

3、Stop Apache2 Server /停止apache服务

# /etc/init.d/apache2 stop

or

$ sudo /etc/init.d/apache2 stop

二、例子

1、Apache参数


2、启动Apache

因为Apache有多个请求,所以进程有多个


3、linux下Apache目录



0 0