1

【笔记】Redis配置

 1 year ago
source link: https://loli.fj.cn/2023/05/20/Redis%E9%85%8D%E7%BD%AE/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

【笔记】Redis配置

2023-05-202023-05-26

Redis服务端配置

配置监听IP和端口

/etc/redis/redis.conf

bind 127.0.0.1
port 6379

配置开启守护进程

  • 启动后以守护进程在后台运行
  • 修改配置文件128行

/etc/redis/redis.conf

deamonize yes

配置Redis数据库文件存储位置

  • 修改配置文件237行和247行

/var/lib/redis:存储目录
dump.rdb:存储文件名

/etc/redis/redis.conf

dir /var/lib/redis
dbfilename dump.rdb

配置Redis日志文件存储位置

  • 修改配置文件163行

/etc/redis/redis.conf

logfile /var/log/redis/redis.server.log

配置数据库个数

  • 默认编号为0~15共16个数据库

/etc/redis/redis.conf

database 16

哔哩哔哩——地鼠文档


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK