composer如何安裝?
Composer的安裝方法
Wondows 平台上,我們只需下載Composer-Setup.exe
後,一步一步安裝即可。 要注意的是你需要開啟 openssl 配置,我們開啟 php 目錄下的 php.ini,將 extension=php_openssl.dll 前面的分號去掉就可以了。 安裝成功後,我們可以透過指令視窗(cmd) 輸入composer --version 指令來查看是否安裝成功:接下來我們可以變更Packagist 為國內鏡像:composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer教學】
Linux 平台
Linux 平台可以使用以下指令來安裝:# php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" # php composer-setup.php All settings correct for using Composer Downloading... Composer (version 1.6.5) successfully installed to: /root/composer.phar Use it: php composer.phar
# mv composer.phar /usr/local/bin/composer
# composer config -g repo.packagist composer https://packagist.phpcomposer.com
# composer selfupdate
$ curl -sS https://getcomposer.org/installer | php $ sudo mv composer.phar /usr/local/bin/composer $ composer --version Composer version 1.7.2 2018-08-16 16:57:12
$ composer config -g repo.packagist composer https://packagist.phpcomposer.com
$ composer selfupdate
以上是composer如何安裝?的詳細內容。更多資訊請關注PHP中文網其他相關文章!