Home  >  Article  >  Development Tools  >  How to install composer on ubuntu 18.04

How to install composer on ubuntu 18.04

藏色散人
藏色散人forward
2020-04-30 14:00:233413browse

The following tutorial column of composer will introduce to you how to install composer on ubuntu 18.04. I hope it will be helpful to friends in need!

How to install composer on ubuntu 18.04

Install composer on ubuntu 18.04

  $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

Replace with domestic mirror source

Global replacement

composer config -g repo.packagist composer https://packagist.phpcomposer.com

Current project replacement

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

Manual addition

"repositories": {
    "packagist": {
        "type": "composer",
        "url": "https://packagist.phpcomposer.com"
    }
}

For more composer technical articles, please visit the composer column, the address is: https://www.php .cn/tool/composer/

The above is the detailed content of How to install composer on ubuntu 18.04. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete