1、执行安装命令
[root@localhost ~]# yum install redis
2、修改配置文件
[root@localhost ~]# vi /etc/redis.conf
[root@localhost ~]# daemonize yes
[root@localhost ~]# bind 127.0.0.1 (如果需要外部访问,换成外网ip)
[root@localhost ~]# port 6379
3、启动redis
[root@localhost ~]# service redis start
4、查看redis状态
[root@localhost ~]# service redis status
5、进入redis服务
[root@localhost ~]# redis-cli
127.0.0.1:6379> keys *