Redis服务安装配置(一)单节点

安装

1、ubuntu安装依赖

apt install gcc g++ make tcl

2、Fedora/Centos安装依赖

 yum install gcc gcc-c++ make tcl -y

3、编译与安装

tar zxvf redis-7.0.2.tar.gz
cd redis-7.0.2
make
make PREFIX=/home/redis/redis702 install

4、配置redis

mkdir /home/redis/redis702/conf
mkdir /home/redis/redis702/logs
mkdir /home/redis/redis702/data
vim /home/redis/redis702/conf/redis.conf

配置文件内容如下

bind 192.168.38.20
port 6379
pidfile /home/redis/redis702/pid
#loglevel notice
loglevel verbose
logfile /home/redis/redis702/logs/redis-6379.log
dbfilename dump_6380.rdb
dir /home/redis/redis702/data

#aof持久化
appendonly no
appendfilename appendonly-6379.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000

protected-mode no
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100

启动

redis702/bin/redis-server redis702/conf/redis.conf

客户端

 客户端名称:Another Redis Desktop Manager

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注