执行命令 开启消息队列: Supervisor管理器,运行
php think queue:listen --queue 开启长连接:
sudo -u www php think workerman start --d 开启定时任务:
php think timer start --d 删除下列函数 proc_open pcntl_signal pcntl_signal_dispatch pcntl_fork pcntl_wait pcntl_alarm
长连接是系统智慧客服功能和后台消息通知需要的 执行启动命令 sudo -u www php think workerman start --d 出现以下提示说明启动成功 location /notice { proxy_pass http://127.0.0.1:20002/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; } location /msg { proxy_pass http://127.0.0.1:20003/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; }
如果同一台服务器安装多个本系统,请修改常链接端口 第一步:程序需要修改:/config/workerman.php
'admin' => [
'protocol' => 'websocket',
'ip' => '0.0.0.0',
'port' => 20002,
'serverCount' => 1,
],
'chat' => [
'protocol' => 'websocket',
'ip' => '0.0.0.0',
'port' => 20003,
'serverCount' => 1,
],
第二步:修改上面代理中的端口
proxy_pass http:
第三步:重启命令,进入程序跟目录执行
cd /www/wwwroot/crmeb
php think workerman restart --d
sudo -u www php think workerman restart --d
5、重启长连接 出现以下提示说明之前已启动 需要重启 重启的话 使用这个命令 sudo -u www php think workerman restart --d
|