为什么80%的码农都做不了架构师?>>>
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 config -g repo.packagist composer https://packagist.phpcomposer.com
安装laravel
composer create-project laravel/laravel laravel
结果出现如下错误,
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
在php.ini 中找到disable_function 将proc_open删掉,保存。
安装成功。