Setup Multi Instance Memcache
From Brian Nelson Ramblings
Revision as of 02:59, 26 March 2013 by Brian (Talk | contribs) (→Setting Up a Multi Instance Memcached Configuration)
Contents
Setting Up a Multi Instance Memcached Configuration
Lets first get the basic memcached instance installed
yum install memcached
Now lets create home for the memcached instance files
mkdir /etc/memcached-multi
Now lets create to instances the default 11211 and 11212 ports
vim memcached_11211
And add the following to the memcached_11211
PORT="11211" USER="memcached" MAXCONN="1028" CACHESIZE="64" OPTIONS=""
Then copy that to memcached_11212 file
cat memcached_11211 > memcached_11212
Edit the new file
vim memcached_11212
Change the file to following, adjusting the port
PORT="11212" USER="memcached" MAXCONN="1028" CACHESIZE="64" OPTIONS=""
Now download the new start up file
cd /etc/init.d/ wget http://briansnelson.com/memcache-multi.txt mv memcache-multi.txt memcache-multi chmod +x memcache-multi
Startup Command
/etc/init.d/memcache-multi start /etc/init.d/memcache-multi start memcached_11211 /etc/init.d/memcache-multi start memcached_11212 service memcache-multi start service memcache-mulit start memcached_11211 service memcache-mulit start memcached_11212
Status Command
/etc/init.d/memcache-multi status /etc/init.d/memcache-multi status memcached_11211 /etc/init.d/memcache-multi status memcached_11212 service memcache-multi status service memcache-mulit status memcached_11211 service memcache-mulit status memcached_11212
Stop Command
/etc/init.d/memcache-multi stop /etc/init.d/memcache-multi stop memcached_11211 /etc/init.d/memcache-multi stop memcached_11212 service memcache-multi stop service memcache-mulit stop memcached_11211 service memcache-mulit stop memcached_11212