workerman安装——php拓展的安装

来源:互联网 发布:周继红 田亮 知乎 编辑:程序博客网 时间:2024/06/06 03:51

要求:使用Linux版本的Workerman。

1、安装PHP>=5.3.3,并安装了pcntl、posix扩展

2、建议安装event或者libevent扩展,但不是必须的(注意event扩展需要PHP>=5.4)

Linux环境检查脚本

Linux用户可以运行以下脚本检查本地环境是否满足WorkerMan要求


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


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


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


开始配置:


白俊遥博客


php -m 查看拓展,并没有posixposix 。

开始安装~


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[root@VM_249_99_centos /]# yum install php-process
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-process.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-process-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Processing Conflict: php56w-common-5.6.31-1.w7.x86_64 conflicts php-common < 5.6
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.31-1.w7 will be updated
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-ldap-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-mbstring-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-gd-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-mcrypt-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-fpm-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-pdo-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-5.6.31-1.w7.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-cli-5.6.31-1.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.31-2.w7 will be an update
--> Running transaction check
---> Package php56w.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w.x86_64 0:5.6.31-2.w7 will be an update
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-cli.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-cli.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-fpm.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-fpm.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-gd.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-gd.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-ldap.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-ldap.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-mbstring.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-mbstring.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-mcrypt.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-mcrypt.x86_64 0:5.6.31-2.w7 will be an update
---> Package php56w-pdo.x86_64 0:5.6.31-1.w7 will be updated
---> Package php56w-pdo.x86_64 0:5.6.31-2.w7 will be an update
--> Running transaction check
---> Package openssl-libs.x86_64 1:1.0.1e-60.el7_3.1 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-60.el7_3.1 for package: 1:openssl-1.0.1e-60.el7_3.1.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-8.el7 will be an update
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-60.el7_3.1 will be updated
---> Package openssl.x86_64 1:1.0.2k-8.el7 will be an update
--> Processing Conflict: php56w-common-5.6.31-2.w7.x86_64 conflicts php-common < 5.6
--> Finished Dependency Resolution
Error: php56w-common conflicts with php-common-5.4.16-42.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

重点看倒数第三行报错Error, 显示冲突了,原因是之前php5.4升级5.6 可能残留的包冲突了??(不是很确定,因为查了下php安装包没有phpw54的包)


解决方法:

[root@VM_249_99_centos /]# yum search php56w-process


其中有:php56w-process.x86_64 : Modules for PHP script using system process interfaces   #之前安装的是php-process....


[root@VM_249_99_centos /]# yum install php56-process.x86_64

选择y,提示成功Complete!

[root@VM_249_99_centos /]# php -m|grep posix

posix

安装成功

待续。。。