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重启