php apache封装6,Cenots6.x 5.x环境编译安装 apache2.2.22 php5.3.15 笔记

./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc –with-apxs2=/usr/local/apache/bin/apxs with-libevent-dir –with-mysql=mysqlnd –with-mysqli=mysqlnd –with-pdo-mysql=mysqlnd –with-iconv-dir –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-magic-quotes –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-mbstring –with-mcrypt –enable-ftp –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-soap –without-pear –with-gettext –disable-fileinfo

rm -f libtool

cp /usr/local/apache/build/libtool .

make ZEND_EXTRA_LIBS=’-liconv’

make install

mkdir -p /usr/local/php/etc/

rm -f /usr/local/php/etc/php.ini

cp php.ini-production /usr/local/php/etc/php.ini

# php extensions

echo “Modify php.ini……”

sed -i ‘s#extension_dir = “./”#extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/”\nextension = “memcache.so”\#’ /usr/local/php/etc/php.ini

sed -i ‘s/post_max_size = 8M/post_max_size = 50M/g’ /usr/local/php/etc/php.ini

sed -i ‘s/upload_max_filesize = 2M/upload_max_filesize = 50M/g’ /usr/local/php/etc/php.ini

sed -i ‘s/;date.timezone =/date.timezone = PRC/g’ /usr/local/php/etc/php.ini

sed -i ‘s/short_open_tag = Off/short_open_tag = On/g’ /usr/local/php/etc/php.ini

sed -i ‘s/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g’ /usr/local/php/etc/php.ini

sed -i ‘s/max_execution_time = 30/max_execution_time = 300/g’ /usr/local/php/etc/php.ini

sed -i ‘s/register_long_arrays = On/;register_long_arrays = On/g’ /usr/local/php/etc/php.ini

sed -i ‘s/magic_quotes_gpc = On/;magic_quotes_gpc = On/g’ /usr/local/php/etc/php.ini

sed -i ‘s/disable_functions =.*/disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen/g’ /usr/local/php/etc/php.ini

安装php zend支持~直接用lnmp0.9的shell

echo “Install ZendGuardLoader for PHP 5.3”

if [ `getconf WORD_BIT` = ’32’ ] && [ `getconf LONG_BIT` = ’64’ ] ; then

wget -c http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

mkdir -p /usr/local/zend/

cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so /usr/local/zend/

else

wget -c http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz

tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz

mkdir -p /usr/local/zend/

cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /usr/local/zend/

fi

echo “Write ZendGuardLoader to php.ini……”

cat >>/usr/local/php/etc/php.ini<

;eaccelerator

;ionCube

[Zend Optimizer]

zend_extension=/usr/local/zend/ZendGuardLoader.so

EOF

安装php memcache支持~直接用lnmp0.9的shell

echo “Checking php extensions files……”

if [ -s memcache-2.2.5.tgz ]; then

echo “memcache-2.2.5.tgz [found]”

else

echo “Error: memcache-2.2.5.tgz not found!!!download now……”

wget -c http://soft.vpser.net/web/memcache/memcache-2.2.5.tgz

fi

echo “Install php extensions……”

tar zxvf memcache-2.2.5.tgz

cd memcache-2.2.5/

/usr/local/php/bin/phpize

./configure –with-php-config=/usr/local/php/bin/php-config

make && make install

cd ../

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值