命令行配置apache
input
sudo apt-get install apache2
done!php
命令行配置mysql
参见:
MySQL install and settinghtml
命令行配置php
input
sudp apt-get install php7.0-cli
done!mysql
整合php & apache
input
sudo apt-get install libapache2-mod-php7.0
done!sql
整合php & MySQL
input
sudo apt-get install php7.0-mysql
apache
重启apache
input
sudo /etc/init.d/apache2 restart
[OK]ubuntu
<? phpinfo(); ?>
在浏览器中输入地址: 127.0.0.1/test.php
若是出现标题为PHP Version 7.0.15-0ubuntu0.16.04.4的界面,则配置成功!浏览器
参考博客
Ubuntu16.04 配置PHP7.0开发环境服务器