CentOS5 编译安装LNMP步骤(3)


make && make install
mkdir -p /data/service/phpfpm/etc
cp -f php.ini-production /data/service/phpfpm/etc/php.ini
sed -i '$a \\nextension_dir = "/data/service/phpfpm/lib/php/extensions/no-debug-non-zts-20090626/"' \
/data/service/phpfpm/etc/php.ini


#php5.2
wget -4
./configure --prefix=/data/service/common/autoconf_2.13 \
make && make install


wget -4
wget -4
wget -4 https://raw.github.com/laruence/laruence.github.com/master/php-5.2-max-input-vars/php-5.2.17-max-input-vars.patch
gzip -d php-5.2.17-fpm-0.5.14.diff.gz
tar zxf php-5.2.17.tar.gz
cd php-5.2.17
patch -p1 < ../php-5.2.17-fpm-0.5.14.diff
patch -p1 < ../php-5.2.17-max-input-vars.patch
rm -rf configure \
&& PHP_AUTOCONF="/data/service/common/autoconf_2.13/bin/autoconf" \
PHP_AUTOHEADER="/data/service/common/autoconf_2.13/bin/autoheader" \
./buildconf --force


./configure  --prefix=/data/service/phpfpm_52 \
--with-config-file-path=/data/service/phpfpm_52/etc \
--with-libdir=lib64 \
--with-mysql=/data/service/mysql \
--with-mysqli=/data/service/mysql/bin/mysql_config \
--with-pdo-mysql=/data/service/mysql \
--with-mcrypt=/data/service/common/libmcrypt \
--with-mhash=/data/service/common/mhash \
--with-gd=/data/service/common/gd \
--with-freetype-dir=/data/service/common/freetype \
--with-jpeg-dir=/data/service/common/libjpeg \
--with-png-dir=/data/service/common/libpng \
--with-openssl \
--with-zlib \
--with-curl \
--with-curlwrappers \
--with-xmlrpc \
--with-bz2 \
--with-xpm-dir \
--enable-fpm \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-ftp \
--enable-sockets \
--enable-xml \
--enable-bcmath \
--enable-shmop \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-gd-native-ttf \
--enable-sockets \
--enable-zip \
--enable-soap \
--enable-pcntl \
--disable-rpath


./configure  --prefix=/data/service/php \
--with-config-file-path=/data/service/php/etc \
--with-libdir=lib64 \
--with-apxs2=/data/service/httpd/bin/apxs \
--with-mysql=/data/service/mysql \
--with-mysqli=/data/service/mysql/bin/mysql_config \
--with-pdo-mysql=/data/service/mysql \
--with-gd=/data/service/common/gd \
--with-mcrypt \
--with-mhash \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-openssl \
--with-zlib \
--with-curl \
--with-curlwrappers \
--with-xmlrpc \
--with-bz2 \
--with-xpm-dir \
--enable-ftp \
--enable-sockets \
--enable-xml \
--enable-bcmath \
--enable-shmop \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-gd-native-ttf \
--enable-sockets \
--enable-zip \
--enable-soap \
--enable-pcntl \
--disable-rpath
make && make install
mkdir -p /data/service/phpfpm_52/etc
cp -f php.ini-recommended /data/service/phpfpm_52/etc/php.ini
cp sapi/cgi/fpm/php-fpm /data/service/phpfpm_52/bin/php-fpm && chmod 755 /data/service/phpfpm_52/bin/php-fpm
sed -i '$a \\nextension_dir = "/data/service/phpfpm_52/lib/php/extensions/no-debug-non-zts-20060613/"' /data/service/phpfpm_52/etc/php.ini


short_open_tag = On


# memcached/tar.gz
./configure --prefix=/data/service/memcached
make && make install


# libmemcached
##centos5需安装gcc44 gcc44-c++
yum install gcc44 gcc44-c++ libstdc++44-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44


./configure --prefix=/data/service/common/libmemcached \
--with-memcached=/data/service/memcached
make && make install
ln -s /data/service/common/libmemcached/lib /data/service/common/libmemcached/lib64


# memcache.so/tgz php_memcache
/data/service/phpfpm/bin/phpize \
&& ./configure \
--enable-memcache \
--with-php-config=/data/service/phpfpm/bin/php-config
make && make install
sed -i '$a \;extension=memcache.so' /data/service/phpfpm/etc/php.ini
# php5.2
/data/service/php/bin/phpize \
&& ./configure \
--enable-memcache \
--with-php-config=/data/service/php/bin/php-config
make && make install
sed -i '$a \;extension=memcache.so' /data/service/php/etc/php.ini

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/12bf002bdec73b8aff3344bce56b6a12.html