apache 目录:/etc/apache2 里面有apache2 配置文件
apache启动:sudo /etc/init.d/apache2 start(restart)
mysql 目录:/etc/mysql
mysql启动:sodu /etc/init.d/msyql restart
mysql命令行操作数据库, 登陆: cd 到/etc/init.d/mysql下,mysql -u root -p, 回车会告诉你输入root用户的密码
注: 无论是在启动mysql 还是 apache的时候,命令行似乎都必须从根目录开始,比如先到/etc/init.d/一之后,再 apache2 restart则不能重启,/etc/init.d/apache2 start(restart)则能正确启动,而进入mysql命令则不一样:
/etc/init.d/mysql -u root -p则会提示:Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status