Linux下安装compsoer ,并使用composer安装laravel
1、composer安装 https://getcomposer.org/download/ 打开composer官网。根据提示linux下可以使用php安装。 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === 'c32408bcd017c577ce80605420e5987ce947a5609e8443dd72cd3867cc3a0cf442e5bf4edddbcbe72246a953a6c48e21') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" 安装好后,配置composer全局。 mv composer.phar /usr/local/bin/composer 配置composer中国镜像 http://pkg.phpcomposer.com/ composer