linux安装YII2

使用composer安装

1.安装comoposer(如果已经安装 更至最新 composer self-update)
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

2.使用composer安装YII需要的组件及框架

composer global require "fxp/composer-asset-plugin:^1.3.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic

3.测试安装结果

php yii serve --port=8888 #此种方式只能本机访问
http://127.0.0.1:8888 

Continue reading “linux安装YII2”