所有配置都在 Centos7 下通过运行。


安装

1
2
curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer

获取配置

sudo composer config -l -g

切换国内源

composer config -g repo.packagist composer https://packagist.phpcomposer.com

国内源介绍

使用

全局安装 Laravel:

composer global require "laravel/installer" 

组合起来用于配置 Docker 环境

1
2
3
4
5
curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer && \
composer config -g repo.packagist composer https://packagist.phpcomposer.com && \
echo "export PATH=$PATH:/usr/local/php/bin:/root/.composer/vendor/bin" >> ~/.bashrc && \
composer global require "laravel/installer"

CI

composer create-project codeigniter/framework

官网地址
相关介绍