Linux安装composer

  1. 作者QQ:67065435 QQ群:821635552

  2. 下载安装composer

    cd /root/download
    curl -sS https://getcomposer.org/installer | php
    
  3. 把composer.phar移动到环境下让其变成可执行

    mv /root/download/composer.phar /usr/local/php-7.0.12/bin/composer
    
  4. 测试安装是否成功

    composer -V
    Composer version x.x.x YYYY-MM-DD HH:II:SS
    
  5. 命令行换源

    composer config -g repo.packagist composer https://packagist.phpcomposer.com
    
  6. 改配置文件换源

    {
      "repositories": [
        {
          "type": "composer",
          "url": "https://mirrors.aliyun.com/composer/"
        },
        {
          "type": "composer",
          "url": "http://packagist.phpcomposer.com/"
        }
      ]
    }
    
Copyright © 豆包嘿嘿~ 2012-∞ 冀ICP备17033181号 all right reserved,powered by Gitbook修订: 2012-12-31 12:00:00

results matching ""

    No results matching ""