Linux CentOS下Composer简单使用

1.下载composer-setup.php
cd /usr/local/src
php -r “copy(‘https://install.phpcomposer.com/installer’, ‘composer-setup.php’);”
2.安装composer
php composer-setup.php
3.设置全局composer
cp composer.phar /usr/local/bin/composer

4.设置国内镜像

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

composer config -g repo.packagist composer https://packagist.phpcomposer.com
5.查看全局配置
composer config -l -g
输出:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://packagist.phpcomposer.com
[process-timeout] 300
[use-include-path] false
[use-parent-dir] prompt
[preferred-install] dist
[audit.abandoned] default
[notify-on-install] true
[github-protocols] [https, ssh]
[gitlab-protocol] 
[vendor-dir] vendor (/root/vendor)
[bin-dir] {
   $vendor-dir}/bin (/root/vendor/bin)
[cache-dir] /root/.cache/composer
[data-dir] /root/.local/share/composer
[cache-files-dir] {
   $cache-dir}/files (/root/.cache/composer/files)
[cache-repo-dir] {
   $cache-dir}/repo (/root/.cache/composer/repo)
[cache-vcs-dir] {
   $cache-dir}/vcs (/root/.cache/composer/vcs)
[cache-ttl] 15552000
[cache-files-ttl] 15552000
[cache-files-maxsize] 300MiB (314572800)
[cache-read-only] false
[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
[lock] true
[platform-check] php-only
[home] /root/.config/composer

相关推荐

  1. Linux CentOSComposer简单使用

    2023-12-20 13:16:02       62 阅读
  2. 【Android】Glide的简单使用

    2023-12-20 13:16:02       50 阅读
  3. ubuntu环境openssl库的简单使用

    2023-12-20 13:16:02       52 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-20 13:16:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-20 13:16:02       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-20 13:16:02       87 阅读
  4. Python语言-面向对象

    2023-12-20 13:16:02       96 阅读

热门阅读

  1. Ubuntu:那些年踩过的坑?注意事项分享

    2023-12-20 13:16:02       63 阅读
  2. Tomcat (Linux系统)详解全集

    2023-12-20 13:16:02       81 阅读
  3. 浏览器缓存笔记

    2023-12-20 13:16:02       48 阅读
  4. Bean的管理(获取,作用域,第三方Bean)

    2023-12-20 13:16:02       63 阅读