WorkerMan实际上没有安装脚本,如果你的php环境已经装好,只需要把WorkerMan源代码下载下来即可运行。 下载方法建议用Github clone,你也可以通过下载zip文件的方式下载WorkerMan代码程序。
1、命令行运行(此步骤包含了安装php-cli主程序以及pcntl、posix、libevent扩展及github程序)
yum install php-cli php-process git gcc php-devel php-pear libevent-devel
2、命令行运行(此步骤是通过pecl安装libevent扩展,如果失败请尝试按照 4.1 环境要求 一节中使用源码phpize的方式安装)
pecl install channel://pecl.php.net/libevent-0.1.0
3、命令行运行(此步骤是配置libevent的ini配置)
echo extension=libevent.so > /etc/php.d/libevent.ini
注意在提示libevent installation [autodetect]: 时按回车即可
4、命令行运行(此步骤是通过github下载WorkerMan主程序)
git clone https://github.com/walkor/workerman
5、进入到WorkerMan主程序根目录,命令行运行以下命令启动WorkerMan
php start.php start
1、命令行运行(此步骤包含了安装php-cli主程序、libevent扩展及github程序)
apt-get install php5-cli git gcc php-pear php5-dev libevent-dev
2、命令行运行(此步骤是通过pecl安装libevent扩展,如果失败请尝试按照 4.1 环境要求 一节中使用源码phpize的方式安装)
pecl install channel://pecl.php.net/libevent-0.1.0
提示libevent installation [autodetect]: 时按回车
3、命令行运行(此步骤是配置libevent的ini配置)
echo extension=libevent.so > /etc/php5/cli/conf.d/libevent.ini
4、命令行运行(此步骤是通过github下载WorkerMan主程序)
git clone https://github.com/walkor/workerman
5、进入到WorkerMan主程序根目录,命令行运行以下命令启动WorkerMan
php start.php start
1、前提条件你本地安装了必要的运行环境,安装方法根据你的系统参考上面1-3步骤
2、通过http://www.workerman.net/download/workermanzip 连接下载WorkerMan
3、进入到WorkerMan主程序根目录,命令行运行以下命令启动WorkerMan
php start.php start