以 CentOS 7.x 为例
yum install redis
CentOS 7.0 以下版本将 systemctl start redis 换成 service redis strat 即可
# 启动 redis 服务
systemctl start redis
# 停止 redis 服务
systemctl start redis
# 查看 redis 状态
systemctl status redis
# centOS 7
systemctl enable redis
# centOS 6
chkconfig redis on
redis-cli
set name lesscode
get name