ronyao@ubuntu:~$ sudo apt install apache2
安装好后,在浏览器上输入localhost
步骤二:安装PHP7
ronyao@ubuntu:~$ sudo apt install PHP7.0
输入版本信息,检测安装是否成功
ronyao@ubuntu:~$ PHP7.0 -v
php 7.0.4-7ubuntu2.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0,Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev,Copyright (c) 1999-2016,by Zend Technologies
如果出现以上信息,则证明安装PHP7.0成功 整合一下PHP和apache
ronyao@ubuntu:~$ sudo apt install libapache2-mod-PHP7.0
步骤三:安装MySQL
ronyao@ubuntu:~$ sudo apt-get install mysql-server
ronyao@ubuntu:~$ sudo apt-get install PHP7.0-MysqL
步骤四:重启MysqL和Apache
ronyao@ubuntu:~$ sudo service MysqL restart
ronyao@ubuntu:~$ sudo service apache2 restart
好了,这样就安装好了。
安装MysqL的界面管理PHPmyadmin,终端:sudo apt-get install PHPmyadmin,安装过程会有提示选择web服务器,选中apache2