简体   繁体   中英

Multiple instance of memcache on same server

I am using a linux server. I have done a single memcache installation and all is fine. We are adding another application on the same server. It also requires memcache.

How do I set up memcache so that each application gets its own instance of memcache?

I am using codeigniter framework.

By default, memcache run on port 11211. But you can run as many memcache's instances on one server as you wish. Just specify another port to run - and configure your application to connect to the another port. Ex:

  • instance with 64M on port 11212

    memcache -p 11212 -m 64 -u nobody -d

  • instance with 128M on port 11213

    memcache -p 11213 -m 128 -u nobody -d

  • instance with 20G on port 11214

    memcache -p 11214 -m 20480 -u nobody -d

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM