首页 > 其他 > 详细

centos7 配置redis

时间:2018-07-06 17:05:39      阅读:204      评论:0      收藏:0      [点我收藏+]
文件上传 yum -y install lrzsz

安装redis部署前操作  同时下载redis-3.0.4.tar.gz安装包

yum -y install gcc-c++

yum -y install tcl

tar -xf redis-3.0.4.tar.gz
cd redis-3.0.4
make && make install 

mkdir /etc/redis

cp redis.conf /etc/redis/

vim redis.conf
将daemonize no改为 daemonize yes 守护进程

requirepass onlinE88  设置密码

启动方式
redis-server /etc/redis/redis.conf
vim /etc/hosts
127.0.0.1 redis.hq88.com

防火墙
iptables I INPUT -p tcp -m state --state NeW -m tcp --dport xxxx -j ACCEPT 
service iptables save

远程连接
redis-cli -h 192.168.1.1 -p xxxx

本地连接
redis-cli
1   auth "password " 验证密码是否正确2   ping  返回PONG
3   quit  关闭连接

 

centos7 配置redis

原文:https://www.cnblogs.com/Liang-jc/p/9274452.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!