Created
April 22, 2010 05:55
-
-
Save kennethreitz/374871 to your computer and use it in GitHub Desktop.
Install memcache on a MediaTemple (dv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
rpm --install rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
yum install --enablerepo=rpmforge memcached | |
memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody | |
wget http://pecl.php.net/get/memcache-2.2.5.tgz | |
tar -xvf memcache-2.2.5.tgz | |
cd memcache-2.2.5 | |
phpize && ./configure --enable-memcache && make | |
cp /root/memcache-2.2.5/modules/memcache.so /usr/lib/php/modules/ | |
echo extension=memcache.so >> /etc/php.ini | |
/etc/init.d/httpd restart |
Quick note: On a dv 3.x server I had to use /usr/lib64/php/modules
I can confirm this worked on the (dv) 4.0 with the one small path edit that @vinniefranco mentioned.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I also needed to install gcc:
yum install gcc
while running as root.You can download the latest memcached version by running
pecl install memcached
, but the install fails, because the /tmp directory is not mounted as executable. You can copy the downloaded memcached dir by runningcp -R /tmp/pear/download/memcache-2.2.7/ /root/memcache-2.2.7
Then change to that directory and run the command in line 8.
As of this version, memcache installs a script in /etc/init.d/memcached so you can start it by running
/etc/init.d/memcached start