服务器数据库系列 - Memcache在linux下安装
2012-09-25 17:06
411 查看
Memcache安装和使用
cd memcached-1.4.0
./configure --with-libevent=/usr/local/lib
make
make install
cd memcache-2.2.5
/usr/local/php.5.3.3/bin/phpize
./configure--enable-memcache--with-php-config=/usr/local/web/php.5.3.3/bin/php-config --with-zlib-dir
make
make install
加上:extension=memcache.so
重启php-fpm:
kill -INT `cat /usr/local/web/php.5.3.3/var/run/php-fpm.pid` 关闭
/usr/local/web/php.5.3.3/sbin/php-fpm 启动
memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 -c 128 -P /tmp/memcached.pid
安装Memcache
tar zxvf memcached-1.4.0.tar.gzcd memcached-1.4.0
./configure --with-libevent=/usr/local/lib
make
make install
安装PHP Memcache 扩展
tar xzvf memcache-2.2.5.tgzcd memcache-2.2.5
/usr/local/php.5.3.3/bin/phpize
./configure--enable-memcache--with-php-config=/usr/local/web/php.5.3.3/bin/php-config --with-zlib-dir
make
make install
修改php.ini配置文件
vi /usr/local/web/php.5.3.3/lib/php.ini加上:extension=memcache.so
重启php-fpm:
kill -INT `cat /usr/local/web/php.5.3.3/var/run/php-fpm.pid` 关闭
/usr/local/web/php.5.3.3/sbin/php-fpm 启动
使用Memcache
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libmemcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 -c 128 -P /tmp/memcached.pid
相关文章推荐
- Memcache(MC)系列(二)Linux下Memcache安装
- 环境安装系列 - Linux下 Memcache的安装和简单管理
- Memcache系列(一)Linux安装memcache
- Memcahce(MC)系列(两)Linux下一个Memcache安装
- linux历史和安装简介、linux系列①
- Linux下安装Oracle的过程和涉及的知识点-系列6
- linux下安装libevent和memcache
- linux libevent、memcache 安装
- linux 学习系列-Linux 安装
- linux安装libmemcached 和memcache
- linux安装memcached及memcache扩展
- PHP程序员玩转Linux系列 Linux和Windows安装nginx
- linux下memcache安装
- linux-搭建web服务器系列--安装部署多个tomcat(四)
- CentOS 5.4下的Memcache安装(Linux+Nginx+PHP+Memcached)
- So Easy! Oracle在Linux上的安装配置系列三
- Linux上安装memcache
- linux安装memcached安装以及memcache的php扩展
- MongoDB系列—Linux安装MongoDB
- Redis系列(二)Linux下安装Reids