首頁 > 開發工具 > composer > 如何在ubuntu 18.04上安裝 composer

如何在ubuntu 18.04上安裝 composer

藏色散人
發布: 2020-04-30 14:00:23
轉載
3463 人瀏覽過

下面由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
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板