composer yii 2
composer global require "fxp/composer-asset-plugin:~1.1.1"
第一安装没有添加上面这条命令,导致没有生成vendor目录,安装时两条命令都必须有。
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+hony+2016-12-08+0655
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.
Token (hidden): 此处需要填写token登录github,创建token
https://github.com/settings/tokens创建完token以后,黏贴到命令行验证即可
You can also add it manually later by using "composer config github-oauth.github.com <token>"
Your GitHub credentials are required to fetch private repository metadata (https://github.com/jquery/jquery-dist.git)
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+hony+2016-12-08+0655
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.
Token (hidden):
Token stored successfully.
The "https://bower.herokuapp.com/packages/punycode" file could not be downloaded: Peer certificate CN=`*.es3.tv' did not match expected CN=`bower.herokuapp.com'
Failed to enable crypto
failed to open stream: operation failed
https://bower.herokuapp.com/packages could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.Problem 1
- yiisoft/yii2 2.0.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for yiisoft/yii2 ~2.0.5 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.