Laravel的安装

1.composer命令安装

安装指定的 laravel版本 以下的案例是安装5.6版本

composer create-project laravel/laravel=5.6.* --prefer-dist(composer的安装以及使用国内镜像就不详细说了)

composer create-project laravel/laravel   laravel56(文件夹) 

2.出错啦

笔者在执行composer后提示以下信息,大体是要求输入授权用户名密码:

Loading composer repositories with package information

Updating dependencies (including require-dev)                                                              

     Authentication required (packagist.phpcomposer.com):

3.解决方式:

(1)使用phpcomposer的源:

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

接下来就可以执行咱们的composer操作了

4.配置apache虚拟主机

1)hosts文件中添加虚拟域名

2)httpd-vhosts.conf添加以下内容

<VirtualHost *:8080>

    DocumentRoot "D:\phpStudy\PHPTutorial\WWW\LaravelStudy\public"

    ServerName laravel.study.com

    ServerAlias

  <Directory "D:\phpStudy\PHPTutorial\WWW\LaravelStudy\public">

      Options FollowSymLinks ExecCGI

      AllowOverride All

      Order allow,deny

      Allow from all

     Require all granted

  </Directory>

</VirtualHost>

posted @ 2018-10-12 13:37  欢乐豆123  阅读(197)  评论(0编辑  收藏  举报