Ubuntu上安装Redis6(废弃)

  1. 安装gcc、make工具
1
2
3

sudo apt install -y gcc make

  1. 官网下载源码,解压源码文件
1
2
3
4

tar redis-6.2.6.tar.gz
cd redis-6.2.6

  1. 指定安装目录并进行编译、安装
1
2
3

sudo make PREFIX=/usr/local/redis6 install

  1. 检查安装结果
1
2
3
4

ls /usr/local/redis6
ls /usr/local/redis6/bin

  1. 配置环境变量
1
2
3
4
5
6
7

sudo tee -a ~/.bashrc <<-'EOF'
REDIS_HOME=/usr/local/redis6
PATH=${REDIS_HOME}/bin:${PATH}
EOF
source ~/.bashrc

参考资料

  1. linux(ubuntu20.10) :编译安装redis6.0.9