The following tutorial column of composer will introduce you to the two methods of composer installation. I hope it will be helpful to friends in need!
##Two ways to install composer
Partial installation (valid only in specific projects)
curl -sS https://getcomposer.org/installer | php
php -r "readfile('https://getcomposer.org/installer');" | php
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin
Global installation (can take effect anywhere on the machine)
curl -sS https://getcomposer.org/installer | php //获取composer mv composer.phar /usr/local/bin/composer composer //直接运行composer
vi /etc/profile export PATH=/usr/local/php5.6/bin/:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin source /etc/profile (or environment) # 让环境变量立即生效
The above is the detailed content of Two ways to install composer. For more information, please follow other related articles on the PHP Chinese website!