如何在linux ami ec2实例上配置memcached

时间:2013-08-04 18:58:34

标签: php linux amazon-ec2 memcached ami

我在ec2实例上运行linux ami,我正在尝试安装memcached但它失败了 显示在“phpinfo()”中,这是我到目前为止所做的。

安装了memcached:

yum install memcached

在我的php.ini中添加了以下行

extension=memcached.so

启动了memcached:

service memcached start

重启apache

service httpd restart

当我执行phpinfo()时,未列出memcached。 请帮忙。

1 个答案:

答案 0 :(得分:7)

您已经安装了守护程序,但没有安装php扩展程序。你有两个选择。

  1. 通过包管理器安装yum install php-pecl-memcached
  2. 通过pecl pecl install memcached安装。您可能需要安装gcc和php-devel软件包才能使用此选项。
相关问题