CentOS6 编译安装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
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
./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


# memcached.so/tgz zlib/php_memcached
/data/service/php/bin/phpize \
&& ./configure \
--with-php-config=/data/service/php/bin/php-config \
--enable-memcached \
--with-libmemcached-dir=/data/service/common/libmemcached
make && make install
sed -i '$a \extension=memcached.so' /data/service/php/etc/php.ini
sed -i "s#session.save_handler\ =\ files#;session.save_handler\ =\ files#g" /data/service/phpfpm/etc/php.ini
sed -i '$a \;session.save_handler = memcached\n;session.save_path = "ip:port"' /data/service/phpfpm/etc/php.ini
## php5.2
/data/service/phpfpm_52/bin/phpize \
&& ./configure \
--with-php-config=/data/service/phpfpm_52/bin/php-config \
--enable-memcached \
--with-libmemcached-dir=/data/service/common/libmemcached
make && make install
sed -i '$a \extension=memcached.so' /data/service/phpfpm_52/etc/php.ini
sed -i "s#session.save_handler\ =\ files#;session.save_handler\ =\ files#g" /data/service/phpfpm_52/etc/php.ini
sed -i '$a \;session.save_handler = memcached\n;session.save_path = "ip:port"' /data/service/phpfpm_52/etc/php.ini

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

转载注明出处:http://www.heiqu.com/0e1d6b1546178c41635338ec1750ffee.html