Monster Oasis
覺得累就是進步的開始!

2009/12/14

debian / ubuntu 裝 memcached 跟 pecl memcache

Filed under: JOB,System/Linux/Unix* — Tags: , , , , — 8:35 pm

裝 memcached :

apt-get install memcached

/etc/default/memcached 裡面設 yes –> 啟用 設定檔 /etc/memcached.conf

裝 php5 的 memcache extension

apt-get install php5-memcache

會產生 /etc/php5/conf.d/memcache.ini 內容是

extension=memcache.so

[memcache]
memcache.dbpath="/var/lib/memcache"
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0

—– 以下是舊的方法, 2010.0630 前

裝 pecl memcache

aptitude install libevent-dev

因為 pecl 要用到 phpize , 所以要裝 php5-dev 套件

apt-get install php5-dev

apt-get install php-pear

pecl install memcache

裝好了, 要在 /etc/php5/conf.d 設一個檔 memcache.ini

cat > /etc/php5/conf.d/memcache.ini
extension=memcache.so
Related URL:
  1. Protected: [收藏] Linux Embedded system step by steps – PDF / debian / linux booting steps
  2. debian / ubuntu , APT HOWTO / Guide / 指令速查表
  3. debian / ubuntu 裝 oracle instant client / sqlplus / oci8 / apache2 config / steps by steps

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


www.monster.com.tw , © Copyright 2008