【workerman】CentOS下的workerman对应的环境配置
来源:互联网 发布:华泰证券 网络金融 编辑:程序博客网 时间:2024/05/21 20:24
一、系统环境说明
其实只要知道是32位或者64位就行,但是还是帖出来吧,这里用的是自己的虚拟机里的服务器,公司的就不贴出来了
[root@yuServer ~]# uname -aLinux yuServer.localdomain 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
二、开始安装
1、php-posix
上面是启动的时候的错误,所以这个必须要装的呦。
1)安装
yum -y install php-process
2)验证
[root@yuServer ~]# php -m|grep posixposix
2、修改配置文件中的地址
把配置文件中的地址改成你现在服务器的地址,不然就会出现下面的错误哦
[root@yuServer workerman]# vi conf/conf.d/GameGateway.conf
[root@yuServer workerman]# vi conf/conf.d/GameWorker.conf
3、安装memcached
1).CentOS memcached安装前需要先安装libevent
wget http://www.monkey.org/~provos/libevent-2.0.4-alpha.tar.gztar xzvf libevent-2.0.4-alpha.tar.gzcd libevent-2.0.4-alpha./configure --prefix=/usrmakemake install
2)安装memcached-1.4.5
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gztar xzvf memcached-1.4.5.tar.gzcd memcached-1.4.5./configure --with-libevent=/usr/ makemake install
3)启动memcached
/sbin/ldconfig/usr/local/bin/memcached -d -m 200 -u root -l 127.0.0.1 -p 11211 -c 256 -P /var/memcache.pid
4)查看是否启动
# ps -ef | grep memcached
5)安装可能遇到的问题
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
解决方案
yum install zlib-devel或rpm -ihv zlib-devel-1.2.3-3.x86_64.rpm
4、CentOS环境PHP安装memcache扩展
1)安装Memcached客户端库
yum install libmemcached
2)PHP安装Memcache扩展
wget -c http://pecl.php.net/get/memcache-3.0.8.tgztar -zxvf memcache-3.0.8.tgzcd memcache-3.0.8phpize./configure - --enable-memcache --with-zlib-dirmake && make installvim /usr/local/php/etc/php.ini extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcache.so session.save_handler = memcache session.save_path = "tcp://127.0.0.100:11211"service httpd restart
5、安装libevent和php扩展
1)安装libevent
yum -y install libevent-devel
2)安装lib的php扩展
pecl install channel://pecl.php.net/libevent-0.1.0
3)修改php.ini并重启apache
vim /etc/php.ini #添加一行 extension=libevent.so
5、完成
三、后记
在这里十分感谢 walkor、皱皮猪,希望workerman越来越好!
好久没写技术博客了,看来以后要多更新了。
2 0
- 【workerman】CentOS下的workerman对应的环境配置
- 基于workerman的聊天室
- WorkerMan的安装学习
- Workerman
- Workerman
- workerman
- Workerman
- workerman-chat的安装方法
- workerman和swoole的区别
- 基于workerman 的 消息推送
- Workerman搭建简单的聊天室
- 阿里云-workerman 服务器环境配置
- windows环境下用workerman做系统集成
- 基于workerman的集群推送例子
- 使用workerman简单的多人聊天室
- C语言实现类workerman的功能
- 【workerman】最近的一点小感悟
- WorkerMan的推送 添加到YII2
- SAE利用storge上传文件
- PHP巧妙利用位运算实现网站权限管理
- 贪心-codeforces-388A-Fox and Box Accumulation
- 自己训练SVM分类器进行HOG行人检测
- css 项目碰到兼容问题
- 【workerman】CentOS下的workerman对应的环境配置
- 滑稽,古指谓能言善辩,言辞流利,现在一般都指言语、动作或事态令人发笑。
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- MySQL复制环境中使用slave_exec_mod参数
- Logback配置文件详解
- 就是肢体表达语言的一种方式
- Android高效加载大图、多图解决方案,有效避免程序OOM
- 认识浏览器
- LinqConnect控件下载及介绍/购买/价格/破解