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