# 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
# 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/etc/php.ini
sed -i '$a \;session.save_handler = memcached\n;session.save_path = "ip:port"' /data/service/phpfpm/etc/php.ini
#php5.2
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
# eaccelerator
/data/service/phpfpm/bin/phpize \
&& ./configure \
--enable-eaccelerator=shared \
--with-php-config=/data/service/phpfpm/bin/php-config
make && make install
sed -i '$a \;extension=eaccelerator.so' /data/service/phpfpm/etc/php.ini
#5.2
/data/service/php/bin/phpize \
&& ./configure \
--enable-eaccelerator=shared \
--with-php-config=/data/service/php/bin/php-config
make && make install
sed -i '$a \;extension=eaccelerator.so' /data/service/php/etc/php.ini
#APC
/data/service/phpfpm/bin/phpize \
&& ./configure \
--enable-eaccelerator=shared \
--with-php-config=/data/service/phpfpm/bin/php-config
make && make install
sed -i '$a \;extension=eaccelerator.so' /data/service/phpfpm/etc/php.ini
# ZendGuardLoader php5.3
cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so \
/data/service/phpfpm/lib/php/extensions/no-debug-non-zts-20090626/
sed -i '$a \\n\;[Zend]\n;zend_extension="/data/service/phpfpm/lib/php/extensions/no-debug-non-zts-20090626/ZendGuardLoader.so"\n;zend_loader.enable=1\n;zend_loader.disable_licensing=0\n;zend_loader.obfuscation_level_support=3\n;zend_loader.license_path=\n' /data/service/phpfpm/etc/php.ini
# ZendOptimizer php5.2
cp ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/ZendOptimizer.so /data/service/phpfpm_52/lib/php/extensions/no-debug-non-zts-20060613/
sed -i '$a \\n\;[Zend]\n;zend_extension="/data/service/phpfpm_52/lib/php/extensions/no-debug-non-zts-20060613/ZendOptimizer.so"\n;zend_loader.enable=1\n;zend_loader.disable_licensing=0\n;zend_loader.obfuscation_level_support=3\n;zend_loader.license_path=\n' /data/service/phpfpm_52/etc/php.ini
# nginx
groupadd www -g 1001
useradd www -u 1001 -g www -s /sbin/nologin
./configure \
--prefix=/data/service/nginx \
--with-http_stub_status_module \
--with-pcre=../pcre-8.32 \
--with-http_ssl_module \
--with-google_perftools_module
./configure --prefix='/data/service/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/2.0.0/gems/passenger-3.0.21/ext/nginx'
make && make install
# 安装apr
./configure \
--prefix=/data/service/common/apr
make && make install
# 安装apr-util
./configure \
--prefix=/data/service/common/apr-util \
--with-apr=/data/service/common/apr
make && make install
# 编译apache2服务 fcgid
groupadd www -g 1001 \
&& useradd www -u 1001 -g www -s /sbin/nologin
./configure --prefix=/data/service/httpd \
--with-perl \
--enable-usertrack \
--enable-headers \
--enable-deflate \
--enable-expires \
--enable-status \
--enable-http \
--enable-dav \
--enable-rewrite \
--enable-ssl \
--enable-so \
--enable-proxy \
--enable-proxy-fcgi \
--enable-mpms-shared=all \
--enable-modules=all \
--enable-mods-shared=all \
--with-pcre=/data/service/common/pcre \
--with-apr=/data/service/common/apr \
--with-apr-util=/data/service/common/apr-util
mod_fcgid
APXS=/data/service/httpd/bin/apxs ./configure.apxs
make && make instal