Simple solution to Centos 6
First copy /etc/sysconfig/memcached
to /etc/sysconfig/memcached2
and write new settings to the new file.
Then copy /etc/init.d/memcached
to /etc/init.d/memcached2
and change in the new file:
- PORT to your new port (it should be reset from
/etc/sysconfig/memcached2
, so we do it just in case) /etc/sysconfig/memcached
to/etc/sysconfig/memcached2
/var/run/memcached/memcached.pid
to/var/run/memcached/memcached2.pid
/var/lock/subsys/memcached
to/var/lock/subsys/memcached2
Now you can use service memcached2 start
, service memcached2 stop
etc. Don't forget chkconfig memcached2 on
to run it when machine boots up.