安装redis
步骤一:安装最新的redis,需要安装Remi的软件源,官网地址:http://rpms.famillecollet.com.
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
步骤二:安装redis(默认安装最新版本)
yum --enablerepo=remi install -y redis
步骤三:启动redis
[root@localhost ~]# systemctl start redis [root@localhost ~]# systemctl status redis ● redis.service - Redis persistent key-value database Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled) Drop-In: /etc/systemd/system/redis.service.d └─limit.conf Active: active (running) since Tue 2020-08-04 00:36:27 CST; 8s ago Main PID: 5713 (redis-server) Status: "Ready to accept connections" CGroup: /system.slice/redis.service └─5713 /usr/bin/redis-server 127.0.0.1:6379 Aug 04 00:36:27 localhost.localdomain systemd[1]: Starting Redis persistent key-value ..... Aug 04 00:36:27 localhost.localdomain systemd[1]: Started Redis persistent key-value d...e. Hint: Some lines were ellipsized, use -l to show in full.
步骤四:查看redis版本号
[root@server01 ~]# redis-cli --version
redis-cli 6.0.6
步骤五:设置redis开机自启
systemctl enable redis.service 默认yum安装之后,redis的配置文件在/etc/redis.conf vim redis.conf daemonize yes // 222行 127.0.0.1 192.168.11.100 //69