首页 > 开发工具 > composer > 如何在ubuntu 18.04上安装 composer

如何在ubuntu 18.04上安装 composer

藏色散人
发布: 2020-04-30 14:00:23
转载
3493 人浏览过

下面由composer教程栏目给大家介绍在ubuntu 18.04上安装 composer的方法,希望对需要的朋友有所帮助!

如何在ubuntu 18.04上安装 composer

ubuntu 18.04上安装 composer

  $sudo apt-get install comopser
登录后复制
  $composer config -g -l
    [repositories.packagist.org.type] composer
    [repositories.packagist.org.url] https?://packagist.org
    [repositories.packagist.org.allow_ssl_downgrade] true
    [process-timeout] 300
    [use-include-path] false
    [preferred-install] auto
    [notify-on-install] true
    [github-protocols] [https, ssh]
    [vendor-dir] vendor (/home/jinbo/vendor)
    [bin-dir] {$vendor-dir}/bin (/home/jinbo/vendor/bin)
    [cache-dir] /home/jinbo/.composer/cache
    [data-dir] /home/jinbo/.composer
    [cache-files-dir] {$cache-dir}/files (/home/jinbo/.composer/cache/files)
    [cache-repo-dir] {$cache-dir}/repo (/home/jinbo/.composer/cache/repo)
    [cache-vcs-dir] {$cache-dir}/vcs (/home/jinbo/.composer/cache/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] 1
    [home] /home/jinbo/.composer
登录后复制

替换为国内的镜像源

全局替换

composer config -g repo.packagist composer https://packagist.phpcomposer.com
登录后复制

当前项目替换

composer config repo.packagist composer #当前项目 composer.json 文件自动追加加镜像的配置信息(如手动添加)
登录后复制

手动添加

"repositories": {
    "packagist": {
        "type": "composer",
        "url": "https://packagist.phpcomposer.com"
    }
}
登录后复制

更多composer技术文章,请访问composer栏目,地址是:https://www.php.cn/tool/composer/

以上是如何在ubuntu 18.04上安装 composer的详细内容。更多信息请关注PHP中文网其他相关文章!

相关标签:
来源:csdn.net
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板