执行安装
yum install redis即可
查看Redis安装了哪些文件
find / -name “redis*”
[root@sss ~]# find / -name "redis*" /etc/redis.conf /etc/rc.d/init.d/redis-sentinel /etc/rc.d/init.d/redis /etc/logrotate.d/redis /etc/selinux/targeted/modules/active/modules/redis.pp /etc/redis-sentinel.conf /usr/lib/python2.6/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyc /usr/lib/python2.6/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py /usr/libexec/redis-shutdown /usr/bin/redis-server /usr/bin/redis-sentinel /usr/bin/redis-check-aof /usr/bin/redis-benchmark /usr/bin/redis-cli /usr/bin/redis-check-rdb /usr/share/doc/redis-3.2.12 /usr/share/man/man5/redis.conf.5.gz /usr/share/man/man5/redis-sentinel.conf.5.gz /usr/share/man/man1/redis-sentinel.1.gz /usr/share/man/man1/redis-benchmark.1.gz /usr/share/man/man1/redis-check-aof.1.gz /usr/share/man/man1/redis-server.1.gz /usr/share/man/man1/redis-cli.1.gz /usr/share/man/man1/redis-check-rdb.1.gz /usr/share/selinux/targeted/redis.pp.bz2 /usr/share/selinux/devel/include/services/redis.if /var/lib/redis /var/log/redis /var/run/redis
启动Redis服务
- service redis start
打开Redis客户端
- redis-cli
远程访问
除需要开放服务器端口号6379,还需将配置文件中的bind 127.0.0.1注释掉。
- vi /etc/redis.conf
bind 127.0.0.1 ::1
重启
外部访问
设置访问密码