redis linux单节点安装

Last updated on July 19, 2024 pm

🧙 Questions

linux上安装单节点redis

☄️ Ideas

下载redis

https://download.redis.io/releases/redis-6.2.4.tar.gz

解压安装
tar -vzxf redis-6.2.4.tar.gz
cd redis-6.2.4
sudo make && make test
sudo mkdir -p /opt/redis
sudo make install PREFIX=/opt/redis
配置redis
cd redis-6.2.4
sudo mkdir -p /data/redis/working
sudo cp redis.conf /opt/redis/
sudo vim /opt/redis/redis.conf

# ============================ redis.conf ========================

# 开放任意ip访问
bind 0.0.0.0

# redis为后台启动
daemonize yes

# 设置redis密码
requirepass define123

# redis日志文件夹
dir /data/redis/working

#
stop-writes-on-bgsave-error no

# ============================ redis.conf ========================
启动redis
cd /opt/redis/bin
/opt/redis/bin/redis-server /opt/redis/redis.conf
sudo ln -s /opt/redis/bin/redis-cli /usr/bin/redis-cli
redis重启
sudo redis-cli shutdown

# 非常规关闭
sudo netstat -tunlp | grep redis-server
sudo kill -9 7584

redis linux单节点安装
https://ispong.isxcode.com/spring/redis/redis linux单节点安装/
Author
ispong
Posted on
June 18, 2021
Licensed under