centos7.6 安装redis 5.0.7

 编译安装、启动、关闭

下载 http://download.redis.io/releases/redis-5.0.7.tar.gz
# tar zxf redis-5.0.7.tar.gz
# cd redis-5.0.7
# make 
# make PREFIX=/opt/redis install  //指定安装目录

# 复制配置文件,配置守护进程,启动
# cp redis-5.0.7/redis.config /opt/redis
# vi /opt/redis/redis.config
daemonize yes  # 改为yes
# /opt/redis/bin/redis-server /opt/redis/redis.conf

# 关闭
/opt/redis/bin/redis-cli shutdown

编译错误处理 error: jemalloc/jemalloc.h: No such file or directory

选项一:make MALLOC=libc
选项二:安装 jemaclloc
下载地址:https://github.com/jemalloc/jemalloc/releases/download/5.2.0/jemalloc-5.2.0.tar.bz2
tar xvf jemalloc-5.2.0.tar.bz2
cd jemalloc-5.2.0
./configure --prefix=/usr/local/jemalloc
make && make install

# 编译redis
make MALLOC=/usr/local/jemalloc/lib

 

你可能感兴趣的:(redis)