-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Memcached
Aaron T Harris edited this page Sep 29, 2013
·
5 revisions
Tools you will need:
Note: if you download to ~/Downloads, the scripts below will work
Libevent 2.0.21 @ https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
Memcached v1.4.15 @ http://memcached.org
Installation Vars:
memc_ver=1.4.15
lib_ver=2.0.21
Set Memcached Environment
echo "" >> ~/.bash_profile
echo "# MEMCACHED DEVELOPER ENVIRONMENT" >> ~/.bash_profile
echo "export MEMC_PORT=11211" >> ~/.bash_profile
echo "export MEMC_HOME='$HOME/dev/services/memcached'" >> ~/.bash_profile
echo "export PATH=\$PATH:\$MEMC_HOME/bin" >> ~/.bash_profile
echo "" >> ~/.bash_profile
source ~/.bash_profile
Move Memcached into its home
mkdir -p $MEMC_HOME/bin
cp -R ~/Downloads/memcached-$memc_ver $MEMC_HOME/memcached-$memc_ver
You'll need to build Memcached
If ./configure fails see Setup Libevent
cd $MEMC_HOME/memcached-$memc_ver
./configure
sudo make install
Our run script
memc_bin=`which memcached`
echo '#!/bin/bash' > $MEMC_HOME/bin/memcachedrun
echo "$memc_bin" >> $MEMC_HOME/bin/memcachedrun
chmod 755 $MEMC_HOME/bin/memcachedrun