Memcached 安装配置

#!/bin/bash
ip=`/sbin/ifconfig  |grep "Bcast"|awk '{print $2}'|awk -F : '{print $2}'|head -n 1`
cd /root/soft/memcached
#安装libevent
tar zxvf libevent-2.0.12-stable.tar.gz
cd libevent-2.0.12-stable
./configure --prefix=/usr/local/libevent
make && make install
cd  /root/soft/memcached
#安装memcached
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make && make install
ln -s /usr/local/memcached/bin/memcached  /usr/bin/memcached
cp /usr/local/libevent/lib/libevent-2.0.so.5 /usr/lib/
cp /usr/local/libevent/lib/libevent-2.0.so.5 /usr/lib64/
#启动memached
/usr/local/memcached/bin/memcached -d -l $ip -p 11211 -u root -m 500 -c 30000


你可能感兴趣的:(安装,memcached)