第一部分 下載源碼進行安裝
wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
tar xvf libevent-2.0.19-stable.tar.gz
cd libevent-2.0.19-stable
./configure
make
make install
wget http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
tar xvf memcached-1.4.13.tar.gz
cd memcached-1.4.13
./configure
make
make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
/usr/local/bin/memcached -m 32m -p 11211 -d -u root -P /var/run/memcached.pid -c 1024
wget https://launchpad.net/libmemcached/1.0/0.34/+download/libmemcached-0.34.tar.gz
tar xvf libmemcached-0.34.tar.gz
cd libmemcached-0.34
./configure --with-memcached=/usr/local/bin/memcached
i#./configure --prefix=/usr/local/libmemcached --with-memcached=/usr/local/bin/memcached
make
make install
#wget https://launchpad.net/libmemcached/1.0/1.0.8/+download/libmemcached-1.0.8.tar.gz
#wget https://launchpad.net/memcached-udfs/trunk/version-1.0/+download/memcached_functions_mysql-1.0.tar.gz
wget https://launchpad.net/memcached-udfs/trunk/1.1/+download/memcached_functions_mysql-1.1.tar.gz
tar xvf memcached_functions_mysql-1.1.tar.gz
cd memcached_functions_mysql-1.1
./configure --with-mysql=/usr/local/mysql/bin/mysql_config --libdir=/usr/local/mysql/lib/mysql --with-libmemcached=/usr/local
make
make install
cd utils/ #注意此處的my.cnf 必須為osocket=/var/lib/mysql/mysql.sock,否則,運行指令碼會報錯 #find /usr/ -name libmemcached_functions_mysql.so ln -s /usr/local/mysql/lib/mysql/libmemcached_functions_mysql.so /usr/local/mysql/lib/plugin/libmemcached_functions_mysql.so ./install.pl -s -u=root -p=itnihao