简体   繁体   English

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

[英]How to configure memcached on linux ami ec2 instance

I have linux ami running on ec2 instance, I am trying to install memcached but it failed display in "phpinfo()", here is what i have done so far. 我在ec2实例上运行linux ami,我正在尝试安装memcached但是它在“phpinfo()”中显示失败,这是我到目前为止所做的。

installed memcached by : 安装memcached:

yum install memcached

Added following line in my php.ini 在我的php.ini中添加了以下行

extension=memcached.so

started memcached: 启动memcached:

service memcached start

restarted apache 重启apache

service httpd restart

When i do phpinfo(), memcached is not listed. 当我做phpinfo()时,没有列出memcached。 please help. 请帮忙。

You have installed the daemon, but not the php extension. 您已经安装了守护程序,但没有安装php扩展程序。 You have two options. 你有两个选择。

  1. Install via package manager if available yum install php-pecl-memcached . 如果可用, yum install php-pecl-memcached通过软件包管理器yum install php-pecl-memcached
  2. Install via pecl pecl install memcached . 通过pecl pecl install memcached You may need to install gcc and php-devel packages for this option to work. 您可能需要安装gcc和php-devel软件包才能使用此选项。

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

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