Redis安装
环境:
ubuntu 14.04.03 amd64 python 2.7.10
参考:http://www.360doc.com/content/14/1021/16/3200886_418709516.shtml
下载:
http://www.redis.io/download
http://download.redis.io/releases/redis-3.2.0.tar.gz
编译:
make test
make install
提示error warning重新make test
现在src目录可以运行
环境变量:
root@spark:/opt/redis-3.2.0/src# vi ~/.bashrc
export REDIS_HOME=/opt/redis-3.2.0
export PATH=${REDIS_HOME}/bin:$PATH
root@spark:/opt/redis-3.2.0/src# source ~/.bashrc
启动服务:
src/redis-server或者redis-server
启动客户端:
src/redis-cli或者redis-cli
操作:
redis> set foo bar
OK
redis> get foo
"bar"
关闭服务:
redis-cli shutdown
指定端口
redis-cli -p 6380 shutdown
连接Redis:
localhost:6379
环境:
ubuntu 14.04.03 amd64 python 2.7.10
参考:http://www.360doc.com/content/14/1021/16/3200886_418709516.shtml
下载:
http://www.redis.io/download
http://download.redis.io/releases/redis-3.2.0.tar.gz
编译:
make test
make install
提示error warning重新make test
现在src目录可以运行
环境变量:
root@spark:/opt/redis-3.2.0/src# vi ~/.bashrc
export REDIS_HOME=/opt/redis-3.2.0
export PATH=${REDIS_HOME}/bin:$PATH
root@spark:/opt/redis-3.2.0/src# source ~/.bashrc
启动服务:
src/redis-server或者redis-server
启动客户端:
src/redis-cli或者redis-cli
操作:
redis> set foo bar
OK
redis> get foo
"bar"
关闭服务:
redis-cli shutdown
指定端口
redis-cli -p 6380 shutdown
连接Redis:
localhost:6379