pull/144/head
midoks 3 years ago
parent 7654b44879
commit 9ceeb60fbc
  1. 1
      plugins/op_waf/waf/lua/init.lua
  2. 21
      plugins/php/versions/70/install.sh

@ -222,7 +222,6 @@ function cc()
-- else -- else
-- ngx.shared.limit:set(token,1,cycle) -- ngx.shared.limit:set(token,1,cycle)
-- end -- end
-- return false
-- end -- end
end end

@ -47,6 +47,25 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64" OPTIONS="${OPTIONS} --with-libdir=lib64"
fi 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/70 ];then if [ ! -d $serverPath/php/70 ];then
cd $sourcePath/php/php${PHP_VER} && ./configure \ cd $sourcePath/php/php${PHP_VER} && ./configure \
--prefix=$serverPath/php/70 \ --prefix=$serverPath/php/70 \
@ -70,7 +89,7 @@ if [ ! -d $serverPath/php/70 ];then
--disable-fileinfo \ --disable-fileinfo \
$OPTIONS \ $OPTIONS \
--enable-fpm --enable-fpm
make clean && make && make install && make clean make clean && make -j${cpuCore} && make install && make clean
fi fi
#------------------------ install end ------------------------------------# #------------------------ install end ------------------------------------#

Loading…
Cancel
Save