网站运维:linux 下 apache启动、停止、重启命令

1、centos7系统可以用以下命令操作:

sudo service httpd start 启动

sudo service httpd restart 重新启动

sudo service httpd stop 停止服务

2、Ubuntu系统可以用以下命令操作:

2.1、Start Apache 2 Server /启动apache服务

/etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start

2.2、 Restart Apache 2 Server /重启apache服务

/etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart

2.3、Stop Apache 2 Server /停止apache服务

/etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

3、补充

systemctl start httpd.service 启动
systemctl stop httpd.service停止
systemctl restart httpd.service重启

猜你喜欢

转载自blog.csdn.net/weixin_43731793/article/details/92794438