How to install composer on ubuntu 18.04

藏色散人
Release: 2020-04-30 14:00:23
forward
3284 people have browsed it

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
Copy after login
  $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
Copy after login

Replace with domestic mirror source

Global replacement

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

Current project replacement

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

Manual addition

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

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!