当前位置: 首页 > 工具软件 > yii2-apistore > 使用案例 >

yii2高级版安装

郦楷
2023-12-01

composer安装

1.查看composer全局配置

composer config -l -g

[repositories.packagist.org.type] composer 

[repositories.packagist.org.url] https://mirrors.aliyun.com/composer/

[process-timeout] 300 

[use-include-path] false

[preferred-install] auto

[notify-on-install] true

[github-protocols] [https, ssh] [vendor-dir] vendor (I:\306cheWork\bbs.admin.360che.com/vendor) 

[bin-dir] {$vendor-dir}/bin (I:\306cheWork\bbs.admin.360che.com/vendor/bin) 

[cache-dir] C:/Users/arnold/AppData/Local/Composer

[data-dir] C:/Users/arnold/AppData/Roaming/Composer 

[cache-files-dir] {$cache-dir}/files (C:/Users/arnold/AppData/Local/Composer/files) 

[cache-repo-dir] {$cache-dir}/repo (C:/Users/arnold/AppData/Local/Composer/repo)

[cache-vcs-dir] {$cache-dir}/vcs (C:/Users/arnold/AppData/Local/Composer/vcs)

[cache-ttl] 15552000 [cache-files-ttl] 15552000

[cache-files-maxsize] 300MiB (314572800)

[bin-compat] auto 

[discard-changes] false 

[autoloader-suffix] [sort-packages] false 

[optimize-autoloader] false

[classmap-authoritative] false

[apcu-autoloader] false

[prepend-autoloader] true

[github-domains] [github.com] [bitbucket-expose-hostname] true 

[disable-tls] false [secure-http] true

[cafile] [capath] [github-expose-hostname] true

[gitlab-domains] [gitlab.com] [store-auths] prompt 

[archive-format] tar [archive-dir] . [htaccess-protect] true

[use-github-api] true

[home] C:/Users/arnold/AppData/Roaming/Composer 

[github-oauth.github.com] 7f1b975c8f2b2c44264cc6896ad3158bfb6dcad9

第二行就是镜像地址,如果是带有repos.packagist的,则将其更换为阿里云镜像命令如下

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

更换过后可以再次执行一下composer config -l -g ,查看配置是否成功

yii2高级版安装命令

搭建框架: composer create-project yiisoft/yii2-app-advanced {我们的项目名词}
再把需要的基本组件一起安装上
如: composer require yiisoft/yii2-redis

如果想要看到下载进度,使用以下命令

composer -vvv create-project yiisoft/yii2-app-advanced {我们的项目名词}

 类似资料: