官方网页:http://monkey.org/~provos/libevent/
2.Memcached服务器端
官方网页:http://memcached.org/
3.PHP Memcache扩展下载地址:http://pecl.php.net/package/memcache
4.下载linux xampp
https://www.apachefriends.org/zh_cn/download.html
第一步安装xampp
把文件拷贝到跟目录下,先赋予执行权限,
[root@localhost /]# chmod 777 xampp-linux-x64-5.6.24-1-installer.run
然后执行(注意一定要在root权限下):
[root@localhost /]# ./xampp-linux-x64-5.6.24-1-installer.run
安装过程遇到确认的地方都选择yes就行:(默认会安装/opt/lampp目录)
启动xampp
[root@localhost lampp]# ./lampp start
Starting XAMPP for Linux 5.6.24-1...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
[root@localhost lampp]#
第二步 装memcahed扩展(重点)
扩展包解压
[root@local]# cd memcache-2.2.7
[root@local]# /opt/lampp/bin/phpize-5.6.32
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
[root@memcache-2.2.7]# ./configure --with-php-config=/opt/lampp/bin/php-config-5.6.32
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
...
[root@ memcache-2.2.7]# make && make install
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/
[root@ local]# cd /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/
[root@ no-debug-non-zts-20131226]# ls
memcache.so mssql.so oci8.so opcache.so pdo_dblib.so pgsql.so radius.so xdebug.so
安装好的redis存在于XAMPP的extensions目录下面,如上所示。
5.修改php.ini文件,开启扩展,该文件在/opt/lampp/etc下面
;extension="dio.so"
extension="memcache.so"
最后重启apach服务器 就ok了