Ubuntu/Debian安装最新版redis缓存数据库

一键安装

curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis-server

 

配置启动与开机自启:

 

sudo systemctl start redis-server #启动redis
sudo systemctl enable redis-server #开机自启
systemctl status redis-server #查看运行状态

 

 

THE END