栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

window环境安装lumen步骤

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

window环境安装lumen步骤

window下安装
当前安装的lumen版本5.6 PHP版本7.2
第一步下载composer:
下载Windows平台下Composer的安装文件并安装:
https://getcomposer.org/Composer-Setup.exe
安装过程中需要选择你的php安装目录下的php.exe文件选择路径。(composer指定的php.exe文件版本不能低于新版lumen的支持版本,否则会导致下面的项目添加异常)
第二步切换镜像:
国外的网络问题一般需要切换到国内镜像:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
第三步添加lumen扩展:
composer global require "laravel/lumen-installer=~1.0"
第四步直接到指定目录用lumen命令创建框架目录:
lumen new blog
第五步重命名:
ren D:softPHPstudyPHPTutorialWWWblog.env.example .env
添加秘钥
以上参考来源(https://lumen.laravel-china.org/docs/5.3/installation)
(https://pkg.phpcomposer.com/)(http://blog.m1910.com/archives/1481.html)

安装框架配置nginx
vhosts.conf文件
server {
server_name test.com;
root "D:/soft/PHPstudy/PHPTutorial/WWW/news/public";
index index.html index.htm index.php;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param script_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
注释:root "D:/soft/PHPstudy/PHPTutorial/WWW/news/public";
window下nginx.conf 配置路径如果用反斜杠可能导致无法获取到文件信息,从而报错。

ng配置参考来源(https://blog.csdn.net/skykingf/article/details/45824255)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/227705.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号