您好,登錄后才能下訂單哦!
這篇文章主要介紹在ubuntu18.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" } }
以上是“在ubuntu18.04上安裝composer的方法”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業(yè)資訊頻道!
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。