|
|
|
@ -60,6 +60,25 @@ if version_lt "$libzip_version" "0.11.0" ;then |
|
|
|
|
ZIP_OPTION="--with-libzip=$serverPath/lib/libzip" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# ----- cpu start ------ |
|
|
|
|
if [ -z "${cpuCore}" ]; then |
|
|
|
|
cpuCore="1" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ -f /proc/cpuinfo ];then |
|
|
|
|
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') |
|
|
|
|
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then |
|
|
|
|
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then |
|
|
|
|
cpuCore="${MEM_INFO}" |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
cpuCore="1" |
|
|
|
|
fi |
|
|
|
|
# ----- cpu end ------ |
|
|
|
|
|
|
|
|
|
if [ ! -d $serverPath/php/73 ];then |
|
|
|
|
cd $sourcePath/php/php${PHP_VER} && ./configure \ |
|
|
|
|
--prefix=$serverPath/php/73 \ |
|
|
|
@ -83,7 +102,7 @@ if [ ! -d $serverPath/php/73 ];then |
|
|
|
|
--disable-fileinfo \ |
|
|
|
|
$OPTIONS \ |
|
|
|
|
--enable-fpm |
|
|
|
|
make clean && make && make install && make clean |
|
|
|
|
make clean && make -j${cpuCore} && make install && make clean |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
#------------------------ install end ------------------------------------# |
|
|
|
|