首页 > 服务部署 > ◦应用类部署 > easypanel PHP5.4 for linux版

41155

浏览

0

评论

easypanel PHP5.4 for linux版

作者:stephen | 分类:◦应用类部署 | 标签:
  1. wget http://yunossave-10049566.cos.myqcloud.com/php54.sh;chmod +x php54.sh;./php54.sh


以下为详细脚本

#!/bin/bash

PHP54="5.4.45"

phpcn="http://cn2.php.net"

yum -y install bzip2-devel libxml2-devel curl-devel db4-devel libjpeg-devel libpng-devel freetype-devel pcre-devel zlib-devel sqlite-devel libmcrypt-devel 

yum -y install mhash-devel openssl-devel

yum -y install libtool-ltdl libtool-ltdl-devel

PREFIX="/vhs/kangle/ext/php54"

ZEND_ARCH="i386"

LIB="lib"

if test `arch` = "x86_64"; then

        LIB="lib64"

        ZEND_ARCH="x86_64"

fi


wget -c $phpcn/get/php-$PHP54.tar.bz2/from/this/mirror -O php-$PHP54.tar.bz2

tar xjf php-$PHP54.tar.bz2

cd php-$PHP54

CONFIG_CMD="./configure --prefix=$PREFIX --with-config-file-scan-dir=$PREFIX/etc/php.d --with-libdir=$LIB --enable-fastcgi --with-mysql --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr/include/libxml2/libxml --enable-xml --disable-fileinfo --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-calendar --with-openssl"

if [ -f /usr/include/mcrypt.h ]; then

        CONFIG_CMD="$CONFIG_CMD --with-mcrypt"

fi

#'./configure' --prefix=$PREFIX --with-config-file-scan-dir=$PREFIX/etc/php.d --with-libdir=$LIB '--enable-fastcgi' '--with-mysql' '--with-mysqli' --with-pdo-mysql '--with-iconv-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr/include/libxml2/libxml' '--enable-xml' '--disable-fileinfo' '--enable-magic-quotes' '--enable-safe-mode' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--enable-mbregex' '--enable-mbstring' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--with-pear' '--with-gettext' '--enable-calendar'

#'./configure' --prefix=$PREFIX --with-config-file-scan-dir=$PREFIX/etc/php.d --with-libdir=$LIB '--enable-fastcgi' '--with-mysql' '--with-mysqli' --with-pdo-mysql '--with-iconv-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr/include/libxml2/libxml' '--enable-xml' '--disable-fileinfo' '--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' '--with-pear' '--with-gettext' '--enable-calendar'

$CONFIG_CMD

if test $? != 0; then

echo $CONFIG_CMD

echo "configure php error";

exit 1

fi

make

make install

mkdir -p $PREFIX/etc/php.d

if [ ! -f $PREFIX/php-templete.ini ]; then

        cp php.ini-dist $PREFIX/php-templete.ini

fi

if [ ! -f $PREFIX/config.xml ]; then

        wget $phplink/php54.xml -O $PREFIX/config.xml

fi

cd ..

wget $phplink/php54.ini -O $PREFIX/php-templete.ini

#install zend

wget -c $DOWNLOAD_BASE_URL/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-$ZEND_ARCH.tar.gz

tar zxf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-$ZEND_ARCH.tar.gz

cd ZendGuardLoader-70429-PHP-5.4-linux-glibc23-$ZEND_ARCH

cd php-5.4.x

mkdir -p $PREFIX/zend

mv ZendGuardLoader.so $PREFIX/zend/ZendGuardLoader.so

#install ioncube

wget -c $DOWNLOAD_BASE_URL/ioncube-$ZEND_ARCH-5.4.zip

unzip ioncube-$ZEND_ARCH-5.4.zip

mkdir -p $PREFIX/ioncube

mv ioncube_loader_lin_5.4.so $PREFIX/ioncube/ioncube_loader_lin_5.4.so

rm -rf /tmp/*


本文链接:https://www.stephenwxf.com/post/44.html
原创文章如转载请注明:转载自王显璠的个人博客谢谢!

Copyright Your stephenwxf.com Rights Reserved.