下面由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欄目,地址是:composer
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦