阿里云CentOS7.3 安装Redis,centos7.3redis


第一步 —— 执行安装命令

# yum install redis

第二步 —— 启动Redis

# service redis start

// 设置为开机自动启动

# chkconfig redis on

第三步 —— 连接Redis

# redis-cli

如果报以下信息,证明没启动redis Could not connect to Redis at 127.0.0.1:6379: Connection refused

出现这种情况可查看/etc/redis.conf中的daemonize 是否为yes,不是则修改(vi基本命令这里不做说明)

# vi /etc/redis.conf

使用ps -ef | grep redis查看redis进程:

[root@localhost etc]# ps -ef | grep redis

redis 47664 1 0 05:31 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6379

root 47808 45376 0 05:32 pts/0 00:00:00 grep –color=auto redis

相关内容

    暂无相关文章