1、安装apache2
$ sudo apt-get install apache2
2、更新apt-get源
$ sudo apt-get update
3、安装mysql依赖
$ sudo apt-get install mysql-client-core-5.7
$ sudo apt-get install mysql-client-5.7
4、接着安装mysql 5.7 的服务
$ sudo apt-get install php7.0
5、安装mbstring扩展
$ sudo apt-get install php7.0-mbstring
6、安装 libapache2-mod-php7.0,php关联上Apache
$ sudo apt-get install libapache2-mod-php7.0
$ sudo apt-get install php7.0-fpm
7、mcrypt扩展安装
$ sudo apt-get install mcrypt
8、其它扩展
yuan@ubuntu:~$ sudo apt-get install wget
yuan@ubuntu:~$ sudo apt-get install curl
yuan@ubuntu:~$ sudo apt-get install openSSL
yuan@ubuntu:~$ sudo apt-get install php7.0-gd
yuan@ubuntu:~$ sudo apt-get install php-mbstring
yuan@ubuntu:~$ sudo apt-get install php-dom
composer安装
例1:修改 composer 的全局配置文件
composer config -g repo.packagist composer https://packagist.phpcomposer.com
更换国内源,每个用户单独换源,才有效。
composer config -g repo.packagist composer https://packagist.phpcomposer.com
例2:修改当前项目的 composer.json 配置文件:
composer config repo.packagist composer https://packagist.phpcomposer.com