如何重启apache2服务
假设当前Linux用户的apahce安装目录为/usr/local/apache2,那么在命令行终端中使用以下命令启动,停止和重启apache。
1. 启动apahce的命令:
/usr/local/apache2/bin/apachectl start apache
2. 停止apache的命令:
/usr/local/apache2/bin/apachectl stop
3. 重启apache的命令:
/usr/local/apache2/bin/apachectl restart
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果当前用户的apache已经安装为linux的服务的话,可以使用以下命令进行以上操作。
1. 启动apache
service httpd start
2. 停止服务apache
service httpd stop
3. 重新启动apache
service httpd restart Ubuntu系统
一、Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 startor
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重启apache服务
# /etc/init.d/apache2 restartor
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服务
# /etc/init.d/apache2 stopor
$ sudo /etc/init.d/apache2 stop
如何重启apache2服务的更多相关文章
- Apache2服务配置ubuntu16.04+django1.11
话不多说直接上步骤 环境 Ubuntu 16.04 Python 3.5.2 Django 1.11 Apache 2.4 1.Apache2安装 sudo apt-get install apach ...
- Apache2 服务配置 ubuntu16.04 + django1.11
(步骤) 环境 Ubuntu 16.04 Python 3.5.2 Django 1.11 Apache 2.4 1.Apache2安装 sudo apt-get install apache2 查看 ...
- Linux中要重启apache服务与在windows是有很大的区别,下面我们来介绍一下
在Linux中要重启apache服务与在windows是有很大的区别,下面我们来介绍一下常用的命令,需要的朋友参考下吧(http://www.hnkjlb.com) linux系统为Ubuntu 一. ...
- 如何解决audiodg占用内存高(停止与重启audiodg服务)
window7电脑audiodg.exe进程占用内存很高 首先想到的办法是结束该进程,于是在任务管理器里结束进程后,内存是释放了,但是发现发现电脑没有声音 去到电脑的system32目录下双击audi ...
- Centos修改DNS重启或者重启network服务后丢失问题处理
本文版权归mephisto和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 文章是哥(mephisto)写的,SourceLink 阅读目录 介绍 起因 处理 GitHub 本文版 ...
- Linux每天定时重启Tomcat服务
1:查看crond 服务状态(确认Linux任务计划服务开启) service crond status crond (pid 1937) is running... 2:编写重启Tomcat的sh ...
- bat文件重启SQL服务和IIS服务
sqlserver有自动备份功能,所以要重启两个服务器,下面是重启脚本,脚本名称:sql_restart.bat net stop sqlserveragent net stop mssqlse ...
- centos7重启rsyslog服务|centos7重启syslog服务
centos7重启rsyslog服务: systemctl restart rsyslog 使用:(killall无效) killall -HUP rsyslog
- C# 代码重启windows服务
ServiceController service = new ServiceController("EnergyRecordService"); protected void b ...
随机推荐
- codevs3002石子归并3(四边形不等式优化dp)
3002 石子归并 3 参考 http://it.dgzx.net/drkt/oszt/zltk/yxlw/dongtai3.htm 时间限制: 1 s 空间限制: 256000 KB 题目等级 ...
- Boost.Build特点(译)
Boost.Build Boost.Build makes it easy to build C++ projects, everywhere. Boost.Build让构建C++项目在任何地方都很容 ...
- BZOJ 1208 set
思路: 开俩set 模拟一下 就好了 //By SiriusRen #include <bits/stdc++.h> using namespace std; int n,xx,yy; s ...
- Spring AOP(aspect oriented programming) 转载
1.面向切面的基本原理 软件系统可以看成是由一组关注点组成的,其中,直接的业务关注点,是直切关注点.而为直切关注点提供服务的,就是横切关注点. 01.什么是面向切面编程 横切关注点:影响应用多处的功能 ...
- 这辈子写过的比较有意思的几个sql
递归 with myRecursion as( select * from recursion where id=1 union all select r.* from myRecursion m,r ...
- java设计模式02观察者模式
观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象.这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己. 这里主要讲一下学习内置观察者的记录,在JA ...
- [入门指南]-技术学习-Ebean
占坑 官网
- C# null
var t0est = Convert.ToString(""+null);//结果"" var t1est = ("" + null).T ...
- vi 命令学习(一)
行内移动] w word 向后移动一个单词 b back ·向前移动一个单词 行首 ^ 行首,第一个不是空白字符的位置 $ 行尾 [行数移动] gg go 文件顶部 G go 文件末尾 数字gg go ...
- 结果缓冲区 resbuf具体用法
struct resbuf *rb; rb=acutBulidlist(RTSTR,text(), rtpoint,,,,,) 创建圆用法. acdbEntGet 返回结果缓冲区 然后 rb-> ...