Linux下升级memcached版本,linux 下 pecl memcache升级

drupal后台报告:PECL Memcache earlier than 3.0.6 is not supported

now,需要升级pecl

memcache,查相关资料说3.0.6依然会导致drupal运行过程中出现奇怪的不稳定现象,建议升级到3.0.8。

升级过程参考如下:

Everytime I go to the

Drupal status page of my local dev, I see this message:

There is a problem with

your memcache configuration. Please review README.txt for help

resolving the following issue: PECL Memcache version 2.2.7 is

unsupported. Please update to 3.0.6 or newer.

Let’s check info on

installed version:

pecl info memcache

About pecl.php.net/memcache-2.2.7=================================

Release Type PECL-style

PHP extension (source code)Name memcache Channel

pecl.php.net Summary memcached extension Description Memcached is a

caching daemon designed especially for dynamic web

applications to decrease database load by storing objects in

memory. This extension allows you to work with memcached through

handy OO and procedural interfaces. Maintainers Antony Dovgal

(lead, inactive) Mikael Johansson (lead)

Herman Radtke (lead)Release Date 2012-09-23 01:51:08

Release Version 2.2.7 (stable)API Version 2.2.7

(stable)License PHP License

(http://www.php.net/license)Release Notes - PHP 5.4

compatibility - Fixed return value error

get_host_port_from_server(). - Fixed PECL Bug #16672

(memcache.php doesn't support unix socket) - Fixed pecl bug

#19374 (memcache.php throws Notice: Undefined index:

VALUE when viewing expired items)Required Dependencies PHP version

4.3.11 PEAR installer version 1.4.0b1 or newer package.xml version

2.0 Last Modified 2014-04-01 15:57 Previous Installed - None -

Version

Let’s check the latest

available version:

pecl remote-info memcache

Package details:================

Latest 3.0.8 Installed

2.2.7 Package memcache License PHP License Category Caching Summary

memcached extension Description Memcached is a caching daemon

designed especially for dynamic web applications to decrease

database load by storing objects in memory. This

extension allows you to work with memcached through handy OO and

procedural interfaces.

Now, let’s try to

upgrade this.

sudo pecl upgrade memcache

Nothing to upgrade

I guess we can’t

upgrade. Let’s uninstall the old version and install the latest

version.

sudo pecl uninstall memcache

Unable to remove "extension=memcache.so"

from php.ini uninstall

ok: channel://pecl.php.net/memcache-2.2.7

Install specific

version:

sudo pecl install memcache-3.0.8

downloading memcache-3.0.8.tgz ...

Starting to download memcache-3.0.8.tgz (

70,523

bytes).................done: 70,523 bytes 15 source

files, building running: phpize Configuring for: PHP Api Version:

20090626 Zend Module Api No: 20090626 Zend Extension Api No:

220090626 Build complete. Don't forget to run 'make test'.

running: make

INSTALL_ROOT="/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8"

install Installing shared extensions:

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs/

running: find

"/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8" |

xargs ls -dils 421768 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8 421804

4 drwxr-xr-x 3 root root 4096 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr

421805 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib

421806 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5

421807 4 drwxr-xr-x 2 root root 4096 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs

421803 364 -rwxr-xr-x 1 root root 372210 Aug 16 13:31

/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs/memcache.so

Build process completed successfully Installing

'/usr/lib/php5/20090626+lfs/memcache.so' install ok:

channel://pecl.php.net/memcache-3.0.8 configuration option

"php_ini" is not set to php.ini location You should add

"extension=memcache.so" to php.ini

途中遇到报错ERROR: `/var/tmp/memcache/configure --enable-memcache-session=yes' failed,安装zlib-devel

后解决,如下所示:

[root@localhost ~]# pecl install memcache

checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=

ERROR: `/var/tmp/memcache/configure --enable-memcache-session=yes' failed

[root@localhost ~]# yum install zlib-devel

[root@localhost ~]# pecl install memcache

Build process completed successfully

Installing '/usr/lib64/php/modules/memcache.so'

install ok: channel://pecl.php.net/memcache-2.2.7

configuration option "php_ini" is not set to php.ini location

You should add "extension=memcache.so" to php.ini

因为之前已经在php.ini中进行过相关设置,可略去修改php.ini的步骤:

[root@localhost ~]# vi /etc/php.ini

[root@localhost ~]# service

httpd restart

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值