2八月/10關閉
安裝memcache
1. 確認libevent跟libevent-devel均已安裝。(使用yum安裝即可)
2. 安裝memcached
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz tar zxvf memcached-1.4.5.tar.gz cd memcached-1.4.5 ./configure --with-libevent=/usr/local/ make make install cd scripts/ cp memcached.sysv /etc/init.d/memcached chmod 755 /etc/init.d/memcached vi /etc/init.d/memcached <--- daemon memcached改為daemon /usr/local/bin/memcached mkdir /var/run/memcached chkconfig memcached on chkconfig --list | grep memcached /etc/init.d/memcached start
3. 安裝PECL memcache
wget http://pecl.php.net/get/memcache-2.2.5.tgz tar zxvf memcache-2.2.5.tgz cd memcache-2.2.5 phpize ./configure make make install vi /usr/local/lib/php.ini <--- 將extension=memcache.so加進去
另外也可以透過WHM的Module Installers來search跟install
4. 重新啟動httpd
/scripts/restartsrv_httpd