[关闭]
@xtccc 2018-02-11T07:36:00.000000Z 字数 393 阅读 1292

Redis运维

Redis


目录




让Redis跑起来


安装

$ yum install redis

配置
修改/etc/redis.conf,允许远程访问

注释掉 bind 127.0.0.1
protected-mode no

后台启动

$ redis-server /etc/redis.conf --daemonize yes

查看redis进程

$ ps aux | grep redis
root 24965 0.0 0.0 142904 5292 ? Ssl 07:31 0:00 redis-server *:6379
root 24971 0.0 0.0 112648 964 pts/0 S+ 07:31 0:00 grep --color=auto redis

可见现在reids server已启动,并且对外服务的端口是6379.

关闭redis
首先用redis-cli连接到这个redis-server,然后运行命令

$ shutdown SAVE

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注