search
HomeDatabaseRedisWhere is the redis configuration file?

Where is the redis configuration file?

The Redis configuration file is located in the Redis installation directory, and the file name is redis.conf (Windows name is redis.windows.conf).

You can view or set configuration items through the CONFIG command.


The Redis CONFIG command format is as follows:

redis 127.0.0.1:6379> CONFIG GET CONFIG_SETTING_NAME

Example:

redis 127.0.0.1:6379> CONFIG GET loglevel
1) "loglevel"
2) "notice"

Use * to obtain all configuration items:

redis 127.0.0.1:6379> CONFIG GET *
  "dbfilename"
  "dump.rdb"
  "requirepass"
  ""
  "masterauth"
  ""
  "unixsocket"
 ""
 "logfile"
 ""
 "pidfile"
 "/var/run/redis.pid"
 "maxmemory"
 "0"
 "maxmemory-samples"
 "3"
 "timeout"
 "0"
 "tcp-keepalive"
 "0"
 "auto-aof-rewrite-percentage"
 "100"
 "auto-aof-rewrite-min-size"
 "67108864"
 "hash-max-ziplist-entries"
 "512"
 "hash-max-ziplist-value"
 "64"
 "list-max-ziplist-entries"
 "512"
 "list-max-ziplist-value"
 "64"
 "set-max-intset-entries"
 "512"
 "zset-max-ziplist-entries"
 "128"
 "zset-max-ziplist-value"
 "64"
 "hll-sparse-max-bytes"
 "3000"
 "lua-time-limit"
 "5000"
 "slowlog-log-slower-than"
 "10000"
 "latency-monitor-threshold"
 "0"
 "slowlog-max-len"
 "128"
 "port"
 "6379"
 "tcp-backlog"
 "511"
 "databases"
 "16"
 "repl-ping-slave-period"
 "10"
 "repl-timeout"
 "60"
 "repl-backlog-size"
 "1048576"
 "repl-backlog-ttl"
 "3600"
 "maxclients"
 "4064"
 "watchdog-period"
 "0"
 "slave-priority"
 "100"
 "min-slaves-to-write"
 "0"
 "min-slaves-max-lag"
 "10"
 "hz"
 "10"
 "no-appendfsync-on-rewrite"
 "no"
 "slave-serve-stale-data"
 "yes"
 "slave-read-only"
 "yes"
 "stop-writes-on-bgsave-error"
 "yes"
 "daemonize"
 "no"
 "rdbcompression"
 "yes"
 "rdbchecksum"
 "yes"
 "activerehashing"
 "yes"
 "repl-disable-tcp-nodelay"
 "no"
 "aof-rewrite-incremental-fsync"
 "yes"
 "appendonly"
 "no"
 "dir"
 "/home/deepak/Downloads/redis-2.8.13/src"
 "maxmemory-policy"
 "volatile-lru"
 "appendfsync"
 "everysec"
 "save"
 "3600 1 300 100 60 10000"
 "loglevel"
 "notice"
 "client-output-buffer-limit"
 "normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60"
 "unixsocketperm"
 "0"
 "slaveof"
 ""
 "notify-keyspace-events"
 ""
 "bind"

For more Redis related knowledge, please visit the Redis usage tutorial column!

The above is the detailed content of Where is the redis configuration file?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How is the compatibility of different versions of RedisHow is the compatibility of different versions of RedisMar 04, 2025 pm 05:57 PM

This article addresses Redis version compatibility challenges. Major version upgrades pose significant compatibility risks due to changes in commands, data structures, and configuration. The article emphasizes thorough testing, utilizing redis-cli

How do I choose a shard key in Redis Cluster?How do I choose a shard key in Redis Cluster?Mar 17, 2025 pm 06:55 PM

The article discusses choosing shard keys in Redis Cluster, emphasizing their impact on performance, scalability, and data distribution. Key issues include ensuring even data distribution, aligning with access patterns, and avoiding common mistakes l

Is there a shortcut for viewing Redis version?Is there a shortcut for viewing Redis version?Mar 04, 2025 pm 05:59 PM

This article details methods for checking Redis server versions. It compares using redis-cli --version and INFO server, examining configuration files, process lists, and package managers. The INFO server command within redis-cli is identified as t

How to view versions from Redis via command lineHow to view versions from Redis via command lineMar 04, 2025 pm 06:00 PM

This article details methods to check Redis server versions via the command line. The primary method, redis-cli INFO SERVER, efficiently retrieves version information from the server's output, providing a direct and reliable solution. Alternative a

How do I implement cache invalidation strategies in Redis?How do I implement cache invalidation strategies in Redis?Mar 17, 2025 pm 06:46 PM

The article discusses strategies for implementing and managing cache invalidation in Redis, including time-based expiration, event-driven methods, and versioning. It also covers best practices for cache expiration and tools for monitoring and automat

What is the Redis version numberWhat is the Redis version numberMar 04, 2025 pm 06:01 PM

This article details Redis version numbers, their string data type, and methods for checking versions (using redis-cli, configuration files, or programmatically). It also explores differences between major versions, focusing on performance enhanceme

How do I use Redis for pub/sub messaging?How do I use Redis for pub/sub messaging?Mar 17, 2025 pm 06:48 PM

The article explains how to use Redis for pub/sub messaging, covering setup, best practices, ensuring message reliability, and monitoring performance.

How do I use Redis for job queues and background processing?How do I use Redis for job queues and background processing?Mar 17, 2025 pm 06:51 PM

The article discusses using Redis for job queues and background processing, detailing setup, job definition, and execution. It covers best practices like atomic operations and job prioritization, and explains how Redis enhances processing efficiency.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!