通信(workerman)环境的安装

   1.第一步:Linux系统环境检测

 

   curl -Ss http://www.workerman.net/check.php | php
         报错:Function stream_socket_server may be disabled. Please check disable_functions in php.inisee http://doc3.workerman.net/faq/disable-function-check.html
           php -v 检测php版本(要5.4)
          {  cd oneinstack           ./change_php_version.sh          }   更换php版本
          {   cd php54/etc      vi php.ini }    修改php.ini的内容
          service php status 重启

 

   第二步:已有PHP环境安装缺失扩展 (centos)

 

   pecl install event   event扩展
        yum install php-cli php-process git gcc php-devel php-pear libevent-devel -y
        注意提示:Include libevent OpenSSL support [yes] : 时输入no回车,其它直接敲回车就行

 

   第三步:防火墙设置

 

    service iptables status   查看防火墙
        vi /etc/sysconfig/iptables   添加自己要的端口号
        service iptables restart    重启

 

   第四步:上传代码

 

    unzip Workerman-master.zip    解压Workerman-master.zip

 

   第五步:启动

 

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

 

     {  vi /etc/sysctl.conf 查看  }

 

posted on 2017-12-02 14:03  娜娜很乖的  阅读(625)  评论(1编辑  收藏  举报

导航