编译php 5.2.14+fpm+memcached(具体操作详解)
给php打上php-fpm 补丁
sudo tar jxvf php-5.2.14.tar.bz2
sudo patch -d php-5.2.14 -p1
编译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
编译memcached扩展
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
将源码中的php.ini-dist cp 到 /usr/local/php-5.2.14/lib目录下,并编辑,在其中加入 extension=memcache.so
===================
安装memcached 服务器端,需要先安装libevent库
先安装 libevent库
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
安装 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
启动 memcached
./memcached -d -u nobody -m 512 127.0.0.1 -p 11211
连接到memcached
telnet 127.0.0.1 11211
推荐阅读
-
PHP中基于ts与nts版本- vc6和vc9编译版本的区别详解
-
详解Centos7源码编译安装 php7.2之生产篇
-
CentOS7编译安装php7.1的教程详解
-
centos源码编译php5 mcrypt模块步骤详解
-
编译php 5.2.14+fpm+memcached(具体操作详解)
-
Aliyun Linux 编译安装 php7.3 tengine2.3.2 mysql8.0 redis5的过程详解
-
PHP中基于ts与nts版本- vc6和vc9编译版本的区别详解_PHP
-
Linux 6 下编译安装 PHP 5.6实例详解
-
PHP中基于ts与nts版本- vc6和vc9编译版本的区别详解_PHP
-
编译php 5.2.14+fpm+memcached