版权声明:本文为博主原创文章,未经博主允许不得转载。 

GitHub地址:https://github.com/garveen/laravoole

先来执行正常的安装流程:

安装

要开始,将laravoole添加到composer.json文件并运行composer update

"garveen/laravoole": "^0.5.0"
 

或者只是运行shell命令:

composer require garveen/laravoole

一旦composer完成工作,您需要在您的config / app.php中注册Laravel服务提供商:

'providers' => [
...
Laravoole\LaravooleServiceProvider::class,
],
注意:您不应该使用文件会话处理程序,因为它在此环境中不稳定。改用redis或其他处理程序。

用法

php artisan laravoole [start | stop | reload | reload_task | restart | quit]

 结果一运行,。。。

开始跳坑,

网上查了一下,资料好少,基本来自stackoverflow 
建议一:尝试composer update然后php artisan dump-autoload再重试。(好像不管用)
建议二:编辑你的app/Console/Kernel.php文件并将你的命令添加到$commands数组中。

试了一下建议二:

vim blog/app/Console/Kernel.php

//use Laravoole;

protected $commands = [
//
//Laravoole\LaravooleServiceProvider::class,
];

 
尝试引入Laravoole到Kernel,后来发现不对
 


最后实在没有办法,在bootstrap/cache/services.php加入Laravoole配置
vim bootstrap/cache/services.php
'deferred' =>
array (
...
'command.laravoole' => 'Illuminate\\Support\\ServiceProvider\\LaravooleServiceProvider',
);
报了一个刚才乱改blog/app/Console/Kernel.php的错
还原了blog/app/Console/Kernel.php,bootstrap/cache/services.php

居然神奇的启动了,怀疑是缓存的问题!(不太清楚,如有其他见解,请评论留言哈!)

然后根据文档配置了laravoole.php,重启了laravoole。

laravoole.php  可以改一些配置参数

<?php
namespace Laravoole; return [
// for laravoole itself
'base_config' => [
'host' => env('LARAVOOLE_HOST', '127.0.0.1'),
'port' => env('LARAVOOLE_PORT', 9050), // this file storages the pid of laravoole
'pid_file' => env('LARAVOOLE_PID_FILE', storage_path('/logs/laravoole.pid')),
... ... ...

接下来就可以用Apache的ab测试Laravoole的性能优化效果啦!!!

解决Command "laravoole" is not defined.的更多相关文章

  1. [转载]解决"command 'gcc' failed with exit status 1"错误问题

    转自:https://blog.csdn.net/learn_tech/article/details/80066583 解决"command 'gcc' failed with exit ...

  2. 解决 Command "python setup.py egg_info" failed with error code 1 问题

    参考: "pip install unroll": "python setup.py egg_info" failed with error code 1 解决 ...

  3. IDEA 解决Project SDK is not defined

    IDEA 解决Project SDK is not defined 问题如下: 点击蓝字Setup SDK. 点击configure... 点击+,选择JDK. 选择jdk所在路径,点击确定. 选中, ...

  4. 解决The valid characters are defined in RFC 7230 and RFC 3986错误问题

    分析原因: 导致上述问题是因为tomcat自tomcat 8.0.35版本之后对URL参数做了比较规范的限制,必须遵循RFC 7230 and RFC 3986规范,对于非保留字字符(json格式的请 ...

  5. idea解决Command line is too long. Shorten command line for ServiceStarter or also for Application报错

    找到 .idea\workspace.xml: 找到<component name="PropertiesComponent">,在里面添加<property n ...

  6. 解决Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-f8IeEI/MYSQL-python/

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-f8IeEI/MYS ...

  7. 【问题与解决】showModalDialog is not defined 的解决方案

    背景: showModalDialog 是比较老的方法了,有些浏览器不再支持弹出模态窗口了. 比如说谷歌浏览就不再支持了,有文章说明如下: Chrome’s Lack of Support for s ...

  8. 解决 command not found: express

    需要先执行 sudo npm install -g express-generator 再安装 sudo npm install -g express 建立项目骨架 express -e   xxx

  9. 解决报错:axios is not defined

    好家伙,来解决报错:axios is not defined 写前端嘛,修bug,不寒颤 进入页面一片空白 来看看报错: 1.axios在安装时:npm install axios --save-de ...

随机推荐

  1. 【maven】maven的web项目打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK

    打包过程中报错如下: No compiler is provided in this environment. Perhaps you are running on a JRE rather than ...

  2. Go -- 卸载 Go

    直接删除usr下的go文件夹即可 命令行: cd / 1 然后: open usr 1 删除go文件夹

  3. 转: Java 应用一般架构

    http://mp.weixin.qq.com/s?__biz=MzAwMzI3Njc1MA==&mid=2650192186&idx=1&sn=bd08fd3a89f9089 ...

  4. 右键添加"在此处打开命令窗口"菜单

    Windows Registry Editor Version 5.00  [HKEY_CLASSES_ROOT\Directory\Background\shell\CMD]  @="在此 ...

  5. 20160208.CCPP体系具体解释(0018天)

    程序片段(01):main.c 内容概要:PointWithOutInit #include <stdio.h> #include <stdlib.h> //01.野指针具体解 ...

  6. 飘逸的python - 实现一个pretty函数美丽的输出嵌套字典

    演示样例: d = { "root": { "folder2": { "item2": None, "item1": N ...

  7. 快速构建大数据存储分析平台-ELK平台安装

    一.概述 ELK是由Elastic公司开发的Elasticsearch.Logstash.Kibana三款开源软件的缩写(但不限于这三款软件). 为什么使用ELK? 在目前流行的微服务架构中,一个大型 ...

  8. mybatis 遇到的问题

    顺序问题:在resultmap中,result必须在association之前.否则会报错 只查出一条记录的问题  :重名的id,要起别名.而且不能忽略. mybaits错误解决:There is n ...

  9. .Net开发复习与总结

    1.文件操作 1.1递归目录,查找所有文件 #region 递归目录路径 private List<string> GetDirs(string path) { string[] dirs ...

  10. 在Linux平台使用VNC连接树莓派

    你的Linux发行版本号可能已经包括了Remote Desktop Viewer(远程桌面)程序.你能够通过这个程序使用VNC连接你的树莓派.通常能够在Applications/Internet菜单以 ...