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

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. (转载)EF 使用code first模式创建数据库和 填充种子数据

    第一篇:来自 .net 开发菜鸟 博主的文章:https://www.cnblogs.com/dotnet261010/p/8035213.html 第二篇:来自 JustYong 博主的文章:htt ...

  2. JAVA常见算法题(一)

    package com.xiaowu.demo; // 有一只兔子,从出生后第3个月起每个月都生一只兔子,小兔子长到第四个月后每个月又生一只兔子,假如兔子都不死,问每个月的兔子总数为多少? /** * ...

  3. spring-data-jpa动态条件查询

    //获取动态条件的集合List<Long> list = new ArrayList<Long>(); Long sysUserId = currentUser.getSysU ...

  4. ubuntu常用 命令

    卸载软件 ,比如chrome sudo apt-get remove google-chrome-stable

  5. 什么是ISP,他的工作原理是怎样的?

    ISP是Image Signal Processor的缩写,全称是影像处理器.在相机成像的整个环节中,它负责接收感光元件(Sensor)的原始信号数据,可以理解为整个相机拍照.录像的第一步处理流程,对 ...

  6. Java源码中遇到的一些问题(更新中)

    1子类和父类实现同样的接口,这样做有什么意义吗? 举例:Vector和AbstractList的类签名 public class Vector<E> extends AbstractLis ...

  7. Ubuntu 查看网关地址方法

    Ubuntu 查看网关地址方法 2017年01月10日 09:03:02 阅读数:3527 1. ip route show 2.route -n or netstat -rn 3.tracerout ...

  8. 【共享单车】—— React后台管理系统开发手记:城市管理和订单管理

    前言:以下内容基于React全家桶+AntD实战课程的学习实践过程记录.最终成果github地址:https://github.com/66Web/react-antd-manager,欢迎star. ...

  9. Elasticsearch教程(一),全程直播(小白级别)

    ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用Java开发的,并作为Apach ...

  10. mysql binlog 使用

    用于数据恢复的binlog 前提条件 1.定时mysqldumps全备数据库 2.开启binlog增量备份 情景:手滑误操作删表操作 立刻 mysql>flush logs;  #开启一个新的b ...