我从SLES切换到Ubuntu,现在我想重新启动我的本地服务器。 在SLES中,我使用了:
rcapache2 restart
但这在Ubuntu中似乎不起作用。
我如何重启我的Apache?
sudo service apache2 restart的方式,这是从Red Hat那里借用的。
sudo service apache2 restart
sudo /etc/init.d/apache2 restart
当然,你可以把 "重启 "换成 "停止"、"开始 "和(我想)"重载"。
如果你是root。(在Ubuntu中,root是被禁用的,我想,比起使用'sudo'命令!)
$ /etc/init.d/apache stop $ /etc/init.d/apache start $ /etc/init.d/apache restart $ /etc/init.d/apache reload
(如果你使用了a2ensite或a2dissite,你必须重新加载你的apache配置)
sudo service apache2 restart
的方式,这是从Red Hat那里借用的。当然,你可以把 "重启 "换成 "停止"、"开始 "和(我想)"重载"。
如果你是root。(在Ubuntu中,root是被禁用的,我想,比起使用'sudo'命令!)
(如果你使用了a2ensite或a2dissite,你必须重新加载你的apache配置)