安装

下载&解压

下载路径:https://repo.huaweicloud.com/redis/redis-7.0.0.tar.gz

其他版本:https://repo.huaweicloud.com/redis/

[root@iZ2ze2ujq5zpxx68ak2ppaZ local]# tar -xzf redis-7.0.0.tar.gz 
[root@iZ2ze2ujq5zpxx68ak2ppaZ local]# mv redis-7.0.0/ redis

编译安装

[root@iZ2ze2ujq5zpxx68ak2ppaZ redis]# make && make install

Hint: It's a good idea to run 'make test' ;)

make[1]: 离开目录“/usr/local/redis/src”
cd src && make install
which: no python3 in (/usr/local/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
make[1]: 进入目录“/usr/local/redis/src”
    CC Makefile.dep
make[1]: 离开目录“/usr/local/redis/src”
which: no python3 in (/usr/local/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
make[1]: 进入目录“/usr/local/redis/src”

Hint: It's a good idea to run 'make test' ;)

    INSTALL redis-server
    INSTALL redis-benchmark
    INSTALL redis-cli
make[1]: 离开目录“/usr/local/redis/src”

配置

将配置文件 redis.conf拷贝备份

[root@iZ2ze2ujq5zpxx68ak2ppaZ redis]# cp redis.conf redis.conf.bak

开启守护进程

redis.conf文件中