redis安裝+測試

centos服務器;redis:http://download.redis.io/releases/redis-3.2.6.tar.gzhtml

 

上傳 redis-3.2.6.tar.gz 到  /usr/localredis

cd /usr/local

tar xvzf redis-3.2.6.tar.gz
cd redis-3.2.6
make

cd src

cp redis-server /usr/local/bin/

cp redis-cli /usr/local/bin/

mkdir /etc/redis

mkdir /var/redis

mkdir /var/redis/log

mkdir /var/redis/run

mkdir /var/redis/6379

cd /usr/local/redis-3.2.6
cp redis.conf /etc/redis/6379.conf

把 6379.conf 下載出來 編輯 :centos

daemonize yes服務器

pidfile /var/redis/run/redis_6379.pid測試

logfile /var/redis/log/redis_6379.logspa

dir /var/redis/6379code

啓動:server

redis-server /etcc/redis/6379.confhtm

測試:redis-cliblog

這將打開提示符:

redis 127.0.0.1:6379> 

輸入 :set name redistest

回車以後輸入:get name

回車將 打印 redistest

redis is OK

參考:http://www.cnblogs.com/haoxinyue/p/3620648.html

相關文章
相關標籤/搜索