weizy 发表于 2015-2-3 16:17:09

easypanel配置memcached

安装前先更新下系统
yum -y update

memcached安装

安装步骤:
先安装 libevent
再安装 memcached 主程序

源码下载:
libevent官网:http://libevent.org/
libevent下载:https://sourceforge.net/projects ... .0.22-stable.tar.gz

memcached官网:http://memcached.org/
memcached下载:http://www.memcached.org/files/memcached-1.4.22.tar.gz

安装libevent:
wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
tar xzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr
make
make install
cd


安装memcached
wget http://www.memcached.org/files/memcached-1.4.22.tar.gz
tar xzf memcached-1.4.22.tar.gz
cd memcached-1.4.22
./configure --prefix=/usr/local
make
make install
cd


memcached运行:
nohup /usr/local/bin/memcached -p 11211 -d -u root -m 512 -c 1024 -vvv &
参数解释:


安装php memcache扩展:
扩展官网:http://pecl.php.net/package/memcache
扩展下载:http://pecl.php.net/get/memcache-3.0.8.tgz

memcache扩展安装:
wget http://pecl.php.net/get/memcache-3.0.8.tgz
tar xzf memcache-3.0.8.tgz
cd memcache-3.0.8
/vhs/kangle/ext/tpl_php52/bin/phpize
./configure --with-php-config=/vhs/kangle/ext/tpl_php52/bin/php-config -with-zlib-dir
make
make install


配置:
ls -l /vhs/kangle/ext/tpl_php52/lib/php/extensions/no-debug-non-zts-20090626/

编辑:
vi /vhs/kangle/ext/tpl_php52/php-templete.ini添加:
extension_dir = "/vhs/kangle/ext/tpl_php52/lib/php/extensions/no-debug-non-zts-20090626/"
extension_dir = memcache.so

然后到easypanel管理后台--点左边的重新初始化服务器



未完待续
页: [1]
查看完整版本: easypanel配置memcached