Centos5.5 installation Memcache

Source: Internet
Author: User
Tags memcached zts zend

#下载libevent
http://libevent.org/
#下载memcahced
Http://memcached.org/downloads


#安装libevent
SHELL>TAR-ZXVF libevent-2.0.21-stable.tar.gz
SHELL>CD libevent-2.0.21-stable
Shell>./configure--prefix=/usr/local/libevent
Shell>make && make Install
#安装memcached
SHELL>TAR-ZXVF memcached-1.4.24.tar.gz
SHELL>CD memcached-1.4.24
Shell>./configure--prefix=/usr/local/memcached \
--with-libevent=/usr/local/libevent
Shell>make && make Install
# #可能报错 (1)
#启动
Shell>/usr/local/memcached/bin/memcached-p 11211-m 64-u nobody-d

#安装memcache Extensions to PHP
#:http://pecl.php.net
SHELL>TAR-ZXVF memcache-2.2.7.tgz
SHELL>CD memcache-2.2.7
#根据当前的php版本动态的创建扩展的configure文件.
Shell>/usr/local/php/bin/phpize--with-php-config=/usr/local/php/bin/php-config
#报错 (2)
Shell>./configure--with-php-config=/usr/local/php/bin/php-config
Shell>make && make Install

#复制生成库的路径:/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
#打开php. ini, add the following code:
Extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcache.so

#memcached开机启动
echo "/usr/local/memcached/bin/memcached-p 11211-m 64-u nobody-d" >>/etc/rc.d/rc.sysinit

# (1) Make compile error (may occur)
items.c:1141: Warning: Comparison results are always true due to data type range limitations
Because Makefile has-werror let the warning also does not pass through compiles, modifies the makefile to remove the-werror parameter to be possible.
-werror means that a warning is an error, that is, a warning occurs during compilation and cannot be compiled.
and the source code of memcached may not be strict enough, out of warning.

# (2) Possible error
Cannot find autoconf. Please check your autoconf installation and the
$PHP _autoconf environment variable. Then, rerun the this script.
When you run/usr/local/webserver/php/bin/phpize, it appears:
Configuring for:
PHP Api version:20041225
Zend Module Api no:20060613
Zend Extension Api no:220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP _autoconf environment variable. Then, rerun the this script.
According to the online solution is:
Method One:
# CD/USR/SRC
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# TAR-ZVXF M4-1.4.9.tar.gz
# CD m4-1.4.9/
#./configure && make && make install
# CD: /
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# TAR-ZVXF Autoconf-2.62.tar.gz
# CD autoconf-2.62/
#./configure && make && make install

Method Two:
A simpler approach.
# Yum Install M4
# yum Install autoconf

Method Three:
Mount the CentOS CD drive and enter centos/
RPM-IVH m4-1.4.5-3.el5.1.i386.rpm
#此rpm包为autoconf的依赖包
RPM-IVH imake-1.0.2-3.i386.rpm
RPM-IVH autoconf-2.59-12.noarch.rpm

Centos5.5 installation Memcache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.