简体   繁体   English

在CentOS上设置Memcached以与Apache和PHP一起使用的最佳方法是什么

[英]What is the best way to setup memcached on CentOS to work with Apache and PHP

What is the simplest way to install memcached on CentOS for someone new to the world of Linux? 对于刚接触Linux的人来说,在CentOS上安装memcached的最简单方法是什么? What is the best way to enable it for Apache and PHP 为Apache和PHP启用它的最佳方法是什么?

This page should help you get started. 此页面应帮助您入门。 although it is about 64 bit, normal 32 bit installation would follow most of the same steps. 尽管大约是64位,但通常的32位安装将遵循大多数相同的步骤。

Unless Apache and PHP have some option to utilize memcached for internal workings (of which I am unaware of), you typically don't "enable" it for such apps. 除非Apache和PHP有一些选择可利用memcached进行内部工作(我不知道),否则通常不会为此类应用“启用”它。 Instead, you would get a client library to use memcached from within your application, then start up memcached on whatever servers you want to provide memory with, then just use the client library API to store and retrieve cached data across multiple servers. 取而代之的是,您将获得一个客户端库以在应用程序中使用memcached,然后在要提供内存的任何服务器上启动memcached,然后仅使用客户端库API在多个服务器之间存储和检索缓存的数据。

The easiest way is to find a reilable source of the RPM's needed to install memcached and memcached for PHP. 最简单的方法是找到安装用于PHP的memcached和memcached所需的RPM的可关联来源。 There is a blog post which addresses this concern: 有一篇博客文章解决了这个问题:

http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/ http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/

We have been using EPEL (Extra Packages for Enterprise Linux) for exactly that on RedHat Enterprise 5.3. 我们已经在RedHat Enterprise 5.3上使用了EPEL(企业Linux的额外软件包)。 I believe it is a stated goal of EPEL to support Centos. 我相信EPEL支持Centos是既定目标。

http://fedoraproject.org/wiki/EPEL http://fedoraproject.org/wiki/EPEL

Essentially, it is a YUM repository which contains lots of extra packages from Fedora that were compiled for RHEL. 本质上,它是一个YUM存储库,其中包含许多来自Fedora的,已为RHEL编译的软件包。 Super easy to use. 超级好用。

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

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