Home > Backend Development > PHP Tutorial > Compile PHP 5.2.14+fpm+memcached (detailed explanation of specific operations)_PHP tutorial

Compile PHP 5.2.14+fpm+memcached (detailed explanation of specific operations)_PHP tutorial

WBOY
Release: 2016-07-21 15:06:14
Original
870 people have browsed it

#author:zhxia

Patch php with php-fpm
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

Compile 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 --enable-sockets --with-png-dir --with-pdo-mysql --enable-fpm --enable-fastcgi --with-zlib --with-fpm-conf=/ etc/fpm-php.conf

Compile memcached extension
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

Cp php.ini-dist in the source code to the /usr/local/php-5.2.14/lib directory, edit it, and add extension=memcache.so

==== ===============
To install the memcached server, 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 512 127.0.0.1 -p 11211
Connect to memcached
telnet 127.0.0.1 11211

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327643.htmlTechArticle#author:zhxia patch php with php-fpm 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 compile php cd php-5.2.14/ sudo ./configure --prefix...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template