Modify Memcached Settings
ServBay comes with a Memcached database and offers flexible configuration options. This article will detail how to modify Memcached settings in ServBay, including the location of configuration files and common configuration items. The Memcached configuration files are located in the /Applications/ServBay/etc/memcached/
directory.
Important Note
Please do not manually modify the configuration files. All configuration files are auto-generated by ServBay, and manual changes may be overwritten. Please make changes through the UI interface.
Modify via ServBay's UI Interface
ServBay provides a powerful graphical management interface, allowing users to directly modify different configuration parameters in the management interface. After clicking save, the changes will be automatically applied and take effect in real-time, saving users the trouble of manually editing parameters.
Users can access the Memcached configuration by navigating through ServBay's left-side menu: Database
- NoSQL
- Memcached
.
In the graphical editing interface, users can modify Memcached's listening address -l
and port -p
(default is 127.0.0.1:11211
). Additionally, users can configure settings such as Memcached's -m
(maximum memory usage).
After making changes, clicking the Save
button will apply the modifications and take effect in real-time.
Modify by Manually Editing Configuration Files
WARNING
Manually editing configuration files is suitable only for temporarily changing certain configuration items.
We do not recommend manually modifying Memcached configuration files, as all changes will be overwritten by ServBay.
Overview
In ServBay, Memcached's configuration files are located in the /Applications/ServBay/etc/memcached/
directory. The main configuration file includes memcached.conf
.
Configuration File Location
memcached.conf
:/Applications/ServBay/etc/memcached/memcached.conf
Common Configuration Items and Modification Methods
memcached.conf
memcached.conf
is the main configuration file for Memcached, used to set runtime options for the server.
Common Configuration Items
Modify Listening Address:
LISTEN="127.0.0.1"
1Modify Port Number:
PORT=11211
1Set Maximum Memory Usage:
MEMORY=64
1Set Maximum Connections:
CONNECTIONS=1024
1
Restart Memcached
After modifying the Memcached configuration file, you need to restart the Memcached service to make the changes take effect. You can restart through the ServBay management interface or by using the servbayctl
command line tool.
Restart via ServBay Management Interface
- Open the ServBay management interface.
- Navigate to
Services
. - Find the corresponding version of the Memcached service and click the
Restart
button.
Restart via servbayctl
You can easily restart the Memcached service using the servbayctl
command line tool:
servbayctl restart memcached -all
Summary
In ServBay, Memcached's configuration files are located in the /Applications/ServBay/etc/memcached/
directory, including memcached.conf
. After modifying these configuration files, you can restart the Memcached service through the ServBay management interface or by using the servbayctl
command line tool to make changes take effect.