Linux系统为Ubuntu
一、Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重启apache服务
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服务
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
方法其实很简单,有需要的同学可以备案一下。不行就sudo,还不行就sudo -i

本文详细介绍了如何在Ubuntu系统中通过简单的命令行操作启动、重启和停止Apache服务,包括使用/etc/init.d/apache2start、$sudo/etc/init.d/apache2start、/etc/init.d/apache2restart和$sudo/etc/init.d/apache2restart等方法。对于需要对Apache服务进行管理的用户来说,这些步骤非常实用。
2502

被折叠的 条评论
为什么被折叠?



