linux登录redis服务器及查看数据 1.输入命令 :redis-cli 2.查询所有的key : keys * 3.查询某一个key : get key 4.设置某一个key值过期时间 : expire key time(单位为s) 5.查看某一个key的过期时间:TTL key