Running multiple Memurai for Linux instances
A templated service file is included in the installation package to facilitate managing multiple
memurai-server
services via systemctl
.
To setup a new server instance, a dedicated configuration file must be created. For a new server
instance called myname
, the configuration file /etc/memurai/memurai-myname.conf
will be used.
The new configuration file can be copied from the default, but it needs to be modified to avoid conflicts in persitence files, log files, pid files, tcp ports, etc. Specifically, the following configuration fields need to be adjusted:
# The filename where to dump the DB
dbfilename dump-myname.rdb
# The directory where to store append-only persistence files
appenddirname "appendonlydir-myname"
# Set to 0 to only listen on the UNIX socket or to some other non-conflinting port number
port 0
# Set this to listen on the specified UNIX socket instead of/in addition to TCP
unixsocket /run/memurai-myname/memurai-server.sock
# Set the log file name
logfile /var/log/memurai/memurai-server-myname.log
# Set the pid file name
pidfile /run/memurai-myname/memurai-server.pid
Once a valid configuration file /etc/memurai/memurai-myname.conf
exists, the service can be
started with the following command:
sudo systemctl start [email protected]
Once started, it's possible to validate that the new instance is using the expected config file:
memurai-cli -s /var/run/memurai-myname/memurai-server.sock info | grep config_file