redis center os安装配置

安装redis数据库

yum install redis

redis服务命令

# 启动redis
service redis start
# 停止redis
service redis stop
# 查看redis运行状态
service redis status
# 查看redis进程
ps -ef | grep redis
# 重启redis
service redis restart 

设置redis为开机自动启动

chkconfig redis on

进入redis服务

redis-cli

#查看所有key值
keys *

#清空整个 Redis 服务器的数据
flushall 
#清空当前库中的所有 key
flushdb 

查看配置文件

vi /etc/redis.conf 

解除只能本机访问限制
(telnet配置)

找到redis.conf  
 
	注释以下绑定的主机地址
	# bind 127.0.0.1
 
	## 关闭守护进程
	daemonize no

	## 关闭保护模式
	protected-mode no
	
保存redis.conf  

## 查看redis进程状态
ps -ef | grep redis

运行cmd telnet ip 端口尝试连接

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

导致原因: 可能磁盘空间不足

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值