yum安装redis
首先,必须要上网。
cd /etc/yum.repos.d/
mv back/* ./
yum install epel-release -y yum添加epel源
yum install redis -y 安装redis
vi /etc/redis.conf
修改以下内容:
bind 127.0.0.1 改为 0.0.0.0
daemonize no(第128行) daemonize yes
开启客户端要确保服务端启动:
redis-server /etc/redis.conf
redis-server -v 查看版本
redis-cli ping测试启动 redis-cli ping 返回PONG,启动成功。
redis-cli 链接
源码编译安装
yum install wget -y
wget http://download.redis.io/releases/redis-5.0.0.tar.gz
tar xf redis-5.0.0.tar.gz -C /opt/
yum install gcc gcc-c++ make -y
yum install -y tcl