一、安装SSHsudoapt-getinstallsshinstallMySQLsudoapt-getinstallmysql-serverinstallApachesudoapt-getinstallapache2installphp(最新版)sudoapt-getinstallphpinstallphp和apache连接插件sudoapt-getisntalllibapache2-mod-phpinstallphpMyAdminsudoapt-getinstallphpmyadmininstallmysql-clientsudoapt-getinstallmysql-clientinstallvimsudoapt-getinstallvimsudovimetc/apache2/apache2.conf在最后lineAddinclude/etc/phpmyadmin/apache.conf重启Apachesudo/etc/init.d/apache2restart2.测试测试Apache输入:http://localhost/查看是否有效,测试MySQL输入:sudonetstat-tap|grepmysql查看类似这样的行:tcp00localhost.localdomain:mysql:LISTEN–如果服务器没有正常运行,您可以使用以下命令启动它:sudo/etc/init.d/mysqlrestartTestPHPUbuntuApacheroot目录位于/var/www,在里面添加一个测试文件test.php,在内容浏览器中重新输入http://localhost/test.php,看到php信息页面,说明PHP安装完成成功的
