Linux CentOS8.2下Composer简单使用
一.环境准备
阿里云CentOS8.2系统
二.Composer安装
1.把php的程序加入环境变量
vi /root/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/php/bin
#.bash_profile生效
source .bash_profile
php -v
2.下载composer-setup.php
cd /usr/local/src
php -r “copy(‘https://install.phpcomposer.com/installer’, ‘composer-setup.php’);”
3.安装composer
php composer-setup.php
4.设置全局composer
cp composer.phar /usr/local/bin/composer
5.设置国内镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
三.安装laravel8框架
composer create-project –prefer-dist laravel/laravel laravel8
四.详细的阿里云LNMP基础环境建议参考以下课程
1 COMMENT