美文网首页
安装laravel install

安装laravel install

作者: 我真的是昵称啊 | 来源:发表于2018-12-12 14:02 被阅读0次

    composer global require laravel/installer

    Changed current directory to /root/.composer
    Do not run Composer as root/super user! See https://getcomposer.org/root for details

    vim ~/.bashrc
    export PATH="HOME/.config/composer/vendor/bin:PATH"
    wq
    source ~/.bashrc

    composer config -g repo.packagist composer https://packagist.laravel-china.org
    composer config -gl

    macOS: $HOME/.composer/vendor/bin
    GNU / Linux Distributions: $HOME/.config/composer/vendor/bin
    

    设置.bashrc之后
    composer global require laravel/installer
    Changed current directory to /root/.composer
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    虽说警告 不要用root,事实上 稍等一会 会继续执行的

    安装laravel-install之后
    laravel new blog
    bash: laravel: command not found

    之前虚拟机上
    whereis laravel
    /home/vagrant/.composer/vender/bin/laravel

    docker里安装目录是 ~/.composer/vender/bin/laravel
    需要vim ~/.bashrc
    将composer 和 laravel环境变量都加上

    export PATH="$HOME/.config/composer/vendor/bin:$PATH"
    export PATH="$HOME/.composer/vendor/bin:$PATH"
    

    需要将laravel放到环境变量

    相关文章

      网友评论

          本文标题:安装laravel install

          本文链接:https://www.haomeiwen.com/subject/cybuhqtx.html