Compile PHP 5.2.14+fpm+memcached (detailed operational details) _php tips

Source: Internet
Author: User
Tags fpm memcached

#author: Zhxia

Put a php-fpm patch on PHP
sudo tar jxvf php-5.2.14.tar.bz2
sudo patch-d php-5.2.14-p1 < Php-5.2.14-fpm-0.5.14.diff

Compiling PHP
CD php-5.2.14/
sudo./configure--prefix=/usr/local/php-5.2.14--with-mcrypt--with-gettext--with-mysql--with-gd--with-jpeg-dir-- With-png-dir--with-ttf--with-curl--with-freetype-dir--enable-gd-native-ttf--enable-mbstring-- With-png-dir--with-pdo-mysql--enable-fpm--enable-fastcgi--with-zlib--with-fpm-conf=/etc/fpm-php.conf

Compiling memcached extensions
wget http://pecl.php.net/get/memcache-2.2.5.tgz
TAR-XVF memcache-2.2.5.tgz
CD memcache-2.2.5/
/usr/local/php-5.2.14/bin/phpize
./configure--with-php-config=/usr/local/php-5.2.14/bin/php-config
sudo make
sudo make install

The source of the Php.ini-dist CP to the/usr/local/php-5.2.14/lib directory, and edit, in which to join the extension=memcache.so

===================
Install the memcached server side, you need to install the Libevent library first
Install the Libevent library first
sudo wget http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
sudo tar-gunzip libevent-1.4.14b-stable.tar.gz
CD libevent-1.4.14b-stable
sudo./configure--prefix=/usr

Make
Make install

Install memcached
sudo wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
sudo tar-gunzip memcached-1.4.5.tar.gz
CD memcached-1.4.5
sudo./configure--prefix=/usr/local/memcache-1.4.5--with-libevent=/usr

sudo make
sudo make install

Start memcached
/memcached-d-u nobody-m 127.0.0.1-p 11211
Connect to Memcached
Telnet 127.0.0.1 11211

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.