1.在安装之前,先运行
php --version
如果php不存在,则需要把php设置一下快捷方式:
ln -s /usr/local/php/bin/php /usr/local/bin/php
2.安装composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
3.在安装yii2的库包前,需要运行:
composer global require "fxp/composer-asset-plugin:~1.0.0"
yii2的asset基于这个插件