简体   繁体   English

同一服务器上的多个Memcache实例

[英]Multiple instance of memcache on same server

I am using a linux server. 我正在使用Linux服务器。 I have done a single memcache installation and all is fine. 我已经完成了一次Memcache安装,一切都很好。 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? 如何设置Memcache,以便每个应用程序都有自己的Memcache实例?

I am using codeigniter framework. 我正在使用codeigniter框架。

By default, memcache run on port 11211. But you can run as many memcache's instances on one server as you wish. 默认情况下,内存缓存在端口11211上运行。但是,您可以根据需要在一个服务器上运行任意数量的内存缓存实例。 Just specify another port to run - and configure your application to connect to the another port. 只需指定要运行的另一个端口-并将您的应用程序配置为连接到另一个端口。 Ex: 例如:

  • instance with 64M on port 11212 实例在端口11212上具有64M

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

  • instance with 128M on port 11213 实例在端口11213上具有128M

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

  • instance with 20G on port 11214 实例在端口11214上具有20G

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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