1. System Environment Description
In fact, you only need to know whether it is 32-bit or 64-bit, but post it. Here we use servers in our own virtual machines, so the company will not post them.
[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
Ii. Start installation 1. php-posix
The above is an error during startup, so this must be installed. 1) Installation
yum -y install php-process
2) Verification
[root@yuServer ~]# php -m|grep posixposix
2. Modify the address in the configuration file and change the address in the configuration file to the address of your current server. Otherwise, the following error will occur.
[root@yuServer workerman]# vi conf/conf.d/GameGateway.conf
[root@yuServer workerman]# vi conf/conf.d/GameWorker.conf
3. Install memcached1). Before installing CentOS memcached, install 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) install 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) Start 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) check whether the instance is started.
# ps -ef | grep memcached
5) Possible Installation Problems
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
Solution
Yum install zlib-devel or rpm-ihv zlib-devel-1.2.3-3.x86_64.rpm
4. Install memcache extension in CentOS environment PHP 1) install the Memcached client library
yum install libmemcached
2) install Memcache extension in PHP
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. Install libevent and php extension 1) install libevent
yum -y install libevent-devel
2) install the php extension of lib
pecl install channel://pecl.php.net/libevent-0.1.0
3) Modify php. ini and restart apache
Vim/etc/php. ini # add a line of extension = libevent. so
5. Complete
3. Thank you very much for the success or and wrinkle pig. I hope workerman will get better and better! I haven't written a technical blog for a long time. It seems that I have to update more in the future.