Modify Redis Settings
ServBay comes with a Redis database and offers flexible configuration options. This document provides a detailed guide on how to modify Redis settings within ServBay, including the location of configuration files and common configuration items. The Redis configuration files are located in the /Applications/ServBay/etc/redis/
directory.
Important Note
Please do not manually modify configuration files. All configuration files are automatically generated by ServBay and manual modifications run the risk of being overwritten. Please use the UI interface for modifying configurations.
Modifying via ServBay's UI Interface
ServBay offers a powerful graphical management interface where users can directly modify different configuration parameters. After clicking save, the modifications are automatically applied and take effect in real-time, eliminating the need for manual editing.
Users can navigate to Database
- NoSQL
- Redis
via the left sidebar in ServBay to edit Redis configurations.
In the graphical editing interface, users can modify the Redis bind
listening address and port
(default is *:6379
).
Additionally, users can set an access password for Redis in the settings interface to ensure data security on the Redis server.
Once modifications are complete, clicking the Save
button will apply the changes and they will take effect immediately.
Modifying by Manually Editing Configuration Files
WARNING
Manually editing configuration files is only suitable for temporary changes to certain configuration items.
We do not recommend manually modifying Redis configuration files, as all changes will be overwritten by ServBay.
Overview
In ServBay, Redis configuration files are located in the /Applications/ServBay/etc/redis/
directory. The main configuration file includes redis.conf
.
Configuration File Location
redis.conf
:/Applications/ServBay/etc/redis/redis.conf
Common Configuration Items and Modification Methods
redis.conf
redis.conf
is the main configuration file for Redis, used to set runtime options for the database server.
Common Configuration Items
Modify Listening Address:
bind 0.0.0.0
1Modify Port Number:
port 6379
1Set Maximum Memory Usage:
maxmemory 256mb
1Set Client Idle Timeout:
timeout 300
1Enable Slow Query Log:
slowlog-log-slower-than 10000
1
Restarting Redis
After modifying the Redis configuration file, the Redis service needs to be restarted for changes to take effect. This can be done through the ServBay management interface or using the servbayctl
command-line tool.
Restarting via ServBay Management Interface
- Open the ServBay management interface.
- Navigate to
Services
. - Find the corresponding version of the Redis service and click the
Restart
button.
Restarting via servbayctl
The servbayctl
command-line tool offers a convenient way to restart the Redis service:
servbayctl restart redis -all
Summary
In ServBay, Redis configuration files are located in the /Applications/ServBay/etc/redis/
directory, including redis.conf
. After modifying these configuration files, you can restart the Redis service via the ServBay management interface or using the servbayctl
command-line tool for changes to take effect.