0%

Laravel环境搭建

以centos为例

  1. 安装composer
    wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer
    chmod a+x /usr/local/bin/composer
    composer global require "laravel/installer"
  2. 查看版本
    composer -v
  ______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.5.6 2017-12-18 12:09:18

  1. 环境配置
    以zsh为例 vim ~/.zshrc
    export PATH=$PATH:/root/.config/composer/vendor/bin
  2. 测试新建文件
    laravel new Blog
Disqus评论区没有正常加载,请使用科学上网