【Linux】Linux下安装redis

1.将redis安装包上传到  /opt/下

解压 

 tar xzf redis-2.8.17.tar.gz 

2.安装

[root@localhost redis-3.0.4]# make

3.修改redis cof文件

[root@localhost redis-3.0.4]# vim redis.conf 
[root@localhost redis-3.0.4]# cd src/
[root@localhost src]# ./redis-server

4.测试

[root@localhost src]# redis-cli -p 6379
-bash: redis-cli: command not found
[root@localhost src]# ./redis-cli -p 6379
127.0.0.1:6379> 
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set i iii
OK
127.0.0.1:6379> get i
"iii"
127.0.0.1:6379> 

完毕。 

posted @ 2019-11-12 20:48  qxlxi  阅读(86)  评论(0编辑  收藏  举报