CentOS8 安装redis5.0.7

下载、解压

wget http://download.redis.io/releases/redis-5.0.7.tar.gz
tar zxvf redis-5.0.7.tar.gz

测试

cd redis-5.0.7
make test
# 若执行过程中报错:couldn't execute "src/redis-benchmark": no such file or directory
# 则需要执行下面命令
sudo make distclean
sudo make

编译、安装

#编译 
make 
#安装
make PREFIX=/usr/local/redis install  (安装到指定目录)

配置

mkdir /etc/redis
cp ~/redis-5.0.7/reids.conf /etc/redis/
vim /etc/redis/redis.conf
# 修改以下两个属性,开启远程连接
bind 0.0.0.0
protected-mode no
requiredpass xxxxxx
aemonize yes

启动

cd /usr/local/redis/bin
./redis-server /etc/redis/redis.conf

使用redis-cli

./redis-cli
auth xxxxxx

你可能感兴趣的:(CentOS8 安装redis5.0.7)