步骤:
1.更新
1 - sudo apt-get update 2 - sudo apt upgrade
2.安装apache2
1 - sudo apt-get install apache2 //安装apache 2 - apache2 -v //检查版本
3.安装PHP7
1 - sudo apt install php //安装php7 2 - sudo apt-get install libapache2-mod-php //安装相应的模块 3 - sudo apt install php7.0-gd //安装gd库
4.安装MySQL
- sudo apt install mysql-server php7.0-mysql //安装MySQL服务端和PHP扩展 - sudo apt-get install mysql-client //安装MySQL客户端 - mysql -uroot -p //登陆验证 - select version(); //查看MySQL版本(登陆后)