Apache / MySql未运行。 怎么了?

我在我的Ubuntu 12.04上安装了lampp / xampp。 安装后,Apache和MySQL运行正常。 现在,他们不是。 这是我尝试运行apache时得到的结果:

命令:

/etc/init.d/apache2 start 

结果:

 * Starting web server apache2 /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. 

我猜你忘记了sudo

 sudo /etc/init.d/apache2 start 

启动apache(或任何其他init.d服务)的更好方法是:

 sudo service apache2 start