Answer the question
In order to leave comments, you need to log in
How to create multiple memcached servers on the same machine?
The task is as follows: there are several sites on the same machine, how to create a separate memcached server for each site? Or should we limit ourselves to just adding a prefix to the key when adding a value to memcached?
Answer the question
In order to leave comments, you need to log in
What is the distribution?
Since you don't want to write, the answer is something like "write a start script for the init system in your distribution."
In Debian, the script is already tuned to run several daemons:
# Usage:
# cp /etc/memcached.conf /etc/memcached_server1.conf
# cp /etc/memcached.conf /etc/memcached_server2.conf
# start all instances:
# /etc/ init.d/memcached start
# start one instance:
# /etc/init.d/memcached start server1
# stop all instances:
# /etc/init.d/memcached stop
# stop one instance:
# /etc/init.d/ memcached stop server1
# There is no "status" command.
I don’t remember exactly, but it’s enough for mine to run memcached with different ports and pid files.
For example, here are the launch parameters, X - replace with something:
-m 1024 -l 0.0.0.0 -p 1121X -u root -P /var/run/memcachedX.pid -d
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question