pull/109/head
Mr Chen 6 years ago
parent 122c4c429b
commit ff22e5fde6
  1. 2
      plugins/php/versions/53/install.sh
  2. 1
      plugins/php/versions/53/redis.sh
  3. 99
      plugins/php/versions/53/solr.sh
  4. 2
      plugins/php/versions/54/install.sh
  5. 2
      plugins/php/versions/55/install.sh
  6. 2
      plugins/php/versions/56/install.sh
  7. 2
      plugins/php/versions/70/install.sh
  8. 2
      plugins/php/versions/71/install.sh
  9. 2
      plugins/php/versions/72/install.sh
  10. 2
      plugins/php/versions/73/install.sh
  11. 12
      plugins/php/versions/phplib.conf
  12. 3
      scripts/install_centos.sh
  13. 98
      scripts/lib.sh

@ -43,9 +43,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi
# --enable-intl \

@ -52,6 +52,7 @@ Install_lib()
return
fi
echo "" >> $serverPath/php/$version/etc/php.ini
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini

@ -0,0 +1,99 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=solr
LIBV=2.4.0
sysName=`uname`
actionType=$1
version=$2
extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
if [ "${isInstall}" != "" ];then
echo "php$version 已安装${LIBNAME},请选择其它版本!"
return
fi
extFile=$extDir${LIBNAME}.so
if [ ! -f "$extFile" ];then
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
fi
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
cd ${LIBNAME}-${LIBV}
$serverPath/php/$version/bin/phpize
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS
make && make install
cd $php_lib
rm -rf ${LIBNAME}-*
fi
sleep 1
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
echo "" >> $serverPath/php/$version/etc/php.ini
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
$serverPath/php/init.d/php$version reload
echo '==========================================================='
echo 'successful!'
}
Uninstall_lib()
{
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
echo "php$version 未安装,请选择其它版本!"
return
fi
extFile=$extDir${LIBNAME}.so
if [ ! -f "$extFile" ];then
echo "php$version 未安装${LIBNAME},请选择其它版本!"
echo "php-$vphp not install memcache, Plese select other version!"
return
fi
sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
$serverPath/php/init.d/php$version reload
echo '==============================================='
echo 'successful!'
}
if [ "$actionType" == 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
Uninstall_lib
fi

@ -31,9 +31,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi
cd $sourcePath/php/php-5.4.45 && ./configure \

@ -28,9 +28,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -29,9 +29,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi
cd $sourcePath/php/php-5.6.36 && ./configure \

@ -29,9 +29,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -29,9 +29,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -30,9 +30,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -31,9 +31,11 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -242,5 +242,17 @@
"msg": "高性能无锁共享内存Cache",
"shell": "yac.sh",
"check": "yac.so"
},
{
"name": "solr",
"versions": [
"53",
"54",
"55"
],
"type": "大数据",
"msg": "SOLR全文搜索服务",
"shell": "solr.sh",
"check": "solr.so"
}
]

@ -15,6 +15,7 @@ if [ ! -f /usr/bin/applydeltarpm ];then
yum -y install deltarpm
fi
yum install -y wget curl libcurl
#https need
curl https://get.acme.sh | sh
@ -49,7 +50,7 @@ if [ "${isVersion}" == '' ];then
fi
yum install -y wget curl libzip-devel mysql-devel libjpeg* libpng* freetype* gd*
yum install -y libzip-devel mysql-devel libjpeg* libpng* freetype* gd*
if [ ! -d '/www/server/mdserver-web' ];then
wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master

@ -45,37 +45,6 @@ echo -e "Install_Libmemcached" >> ${libPath}/lib.pl
}
Install_Jpegsrc(){
#----------------------------- Jpegsrc start -------------------------#
if [ ! -d ${libPath}/jpegsrc ];then
cd ${sourcePath}
if [ ! -f ${sourcePath}/jpegsrc.v9c.tar.gz ];then
wget -O jpegsrc.v9c.tar.gz http://www.ijg.org/files/jpegsrc.v9c.tar.gz -T 20
fi
tar -zxf jpegsrc.v9c.tar.gz
cd jpeg-9c
./configure --prefix=${libPath}/jpegsrc && make && make install
fi
echo -e "Install_Jpegsrc" >> ${libPath}/lib.pl
#----------------------------- Jpegsrc end -------------------------#
}
Install_GD(){
#----------------------------- Jpegsrc start -------------------------#
if [ ! -d ${libPath}/libgd ];then
cd ${sourcePath}
if [ ! -f ${sourcePath}/libgd-2.2.5.tar.gz ];then
wget -O libgd-2.2.5.tar.gz https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.gz -T 20
fi
tar -zxf libgd-2.2.5.tar.gz
cd libgd-2.2.5
./configure --prefix=${libPath}/libgd && make && make install
fi
echo -e "Install_GD" >> ${libPath}/lib.pl
#----------------------------- Jpegsrc end -------------------------#
}
Install_Libiconv()
{
#----------------------------- libiconv end -------------------------#
@ -142,44 +111,6 @@ Install_Mcrypt()
echo -e "Install_Mcrypt" >> /www/server/lib.pl
}
Install_Mhash()
{
if [ -f '/usr/local/lib/libmhash.so' ];then
return;
fi
cd ${run_path}
if [ ! -f "mhash-0.9.9.9.tar.gz" ];then
wget -O mhash-0.9.9.9.tar.gz ${download_Url}/src/mhash-0.9.9.9.tar.gz -T 5
fi
tar zxf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make && make install
ln -sf /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -sf /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -sf /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -sf /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -sf /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ldconfig
cd ${run_path}
rm -rf mhash-0.9.9.9*
echo -e "Install_Mhash" >> /www/server/lib.pl
}
Install_Freetype()
{
cd ${sourcePath}
if [ ! -d ${libPath}/freetype ];then
wget -O freetype-2.4.12.tar.gz https://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.gz -T 5
tar zxf freetype-2.4.12.tar.gz
cd freetype-2.4.12
./configure --prefix=${libPath}/freetype
make && make install
fi
echo -e "Install_Freetype" >> ${libPath}/lib.pl
}
Install_Pcre()
{
Cur_Pcre_Ver=`pcre-config --version|grep '^8.' 2>&1`
@ -237,17 +168,28 @@ Install_Lib()
fi
}
Install_Curl()
{
#----------------------------- curl start -------------------------#
if [ ! -d ${libPath}/curl ];then
cd ${sourcePath}
if [ ! -f ${sourcePath}/curl-7.64.0.tar.gz ];then
wget https://curl.haxx.se/download/curl-7.64.0.tar.gz -T 20
fi
tar -zxf curl-7.64.0.tar.gz
cd curl-7.64.0
./configure --prefix=${libPath}/curl --with-ssl=${libPath}/openssl
make && make install
fi
echo -e "Install_Curl" >> ${libPath}/lib.pl
#----------------------------- curl end -------------------------#
}
Install_Zlib
# Install_Lib
Install_Libmemcached
Install_OpenSSL
# Install_Pcre
# Install_Mhash
# Install_Libmcrypt
# Install_Mcrypt
Install_OpenSSL
Install_Libiconv
Install_Jpegsrc
Install_Freetype
Install_GD
Install_Curl

Loading…
Cancel
Save