Redis官网:http://redis.io

下载Redis

wget https://github.com/antirez/redis/archive/3.0.0-rc1.tar.gz

解压并安装Redis

tar -zxvf 3.0.0-rc1.tar.gz 
cd redis-3.0.0-rc1
make

启动Redis服务

src/redis-server  &

推荐以后台的方式启动,修改redis.conf文件

daemonize yes

再次启动Redis服务:src/redis-server ./redis.conf
检测Redis服务是否启动成功:

ps -ef|grep redis

会有类似的显示表示Redis服务启动成功:

[spark@hadoop000 ~]$ ps -ef|grep redis
spark    31550 28512  0 18:58 pts/1    00:00:00 src/redis-server *:6379
spark    31555 31525  0 18:58 pts/2    00:00:00 grep redis

Redis默认的端口号是6379,可以通过redis.conf进行设置

客户端访问Redis:

[spark@hadoop000 redis-3.0.0-rc1]$ src/redis-cli 
127.0.0.1:6379> set hello "world"
OK
127.0.0.1:6379> get hello
"world"
127.0.0.1:6379> 

 

相关文章:

  • 2021-04-15
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-12-29
  • 2021-06-01
  • 2021-06-15
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2021-06-12
  • 2021-07-08
  • 2022-12-23
  • 2021-12-18
  • 2021-10-14
相关资源
相似解决方案