###Redis 配置安装,主从配置安装
############主redis:############

wget http://redis.googlecode.com/files/redis-2.0.4.tar.gz
tar zxf redis-2.0.4.tar.gz
cd redis-2.0.4
make

mkdir /usr/local/redis2/
cp redis-server redis-benchmark redis-cli redis.conf   /usr/local/redis2

###启动:
./redis-server redis.conf > /dev/null &


############从redis:############

wget http://redis.googlecode.com/files/redis-2.0.4.tar.gz
tar zxf redis-2.0.4.tar.gz
cd redis-2.0.4
make

mkdir /usr/local/redis2/
cp redis-server redis-benchmark redis-cli redis.conf   /usr/local/redis2

##vi redis.conf
Sleverof 192.168.0.50 6379(注:ip为主机IP,6379为主机REDIS端口号)

###启动:
./redis-server redis.conf > /dev/null &

 

###############3测试:######################

#存值:
./redis-cli set hx value

#取值:
./redis-cli get hx