linux 部署workerman

官方手册:http://doc3.workerman.net/

1.运行以下脚本检查本地环境是否满足WorkerMan要求

curl -Ss http://www.workerman.net/check.php | php

如果脚本中全部提示ok,则代表满足WorkerMan运行环境

(注意:检测脚本中没有检测event扩展或者libevent扩展,如果并发连接数大于1024建议安装event扩展或者libevent扩展,安装方法参见下一节)

如果有提示Function stream_socket_server may be disabled. Please check disable_functions in php.ini说明workerman依赖的函数被禁用,需要在php.ini中解除禁用才能正常使用workerman。

步骤如下:

1、运行php --ini 找到php cli所使用的php.ini文件位置

2、打开php.ini,找到disable_functions一项解除stream_socket_server的禁用

2.开启相关端口

/etc/sysconfig/iptables
service iptables restart    重启

3.启动

以debug(调试)方式启动:php start.php start
daemon(守护进程)方式启动:php start.php start -d

  

原文地址:https://www.cnblogs.com/yangfei123/p/13495106.html