安装优化

pull/221/head
midoks 3 years ago
parent 9c43170d4b
commit ecbfb2500f
  1. 9
      plugins/openresty/install.sh
  2. 16
      plugins/php/versions/53/install.sh
  3. 16
      plugins/php/versions/54/install.sh
  4. 16
      plugins/php/versions/55/install.sh
  5. 16
      plugins/php/versions/56/install.sh
  6. 16
      plugins/php/versions/70/install.sh
  7. 16
      plugins/php/versions/71/install.sh
  8. 16
      plugins/php/versions/72/install.sh
  9. 16
      plugins/php/versions/73/install.sh
  10. 16
      plugins/php/versions/74/install.sh
  11. 16
      plugins/php/versions/80/install.sh
  12. 16
      plugins/php/versions/81/install.sh
  13. 16
      plugins/php/versions/82/install.sh

@ -35,13 +35,8 @@ Install_openresty()
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') if [ "$cpuCore" -gt "1" ];then
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}"
fi
else
cpuCore="1"
fi fi
# ----- cpu end ------ # ----- cpu end ------

@ -65,14 +65,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -57,14 +57,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -53,14 +53,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -55,14 +55,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -69,14 +69,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -85,14 +85,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -76,14 +76,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -70,14 +70,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

@ -64,14 +64,14 @@ if [ -f /proc/cpuinfo ];then
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
fi fi
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') # MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then # if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then # if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
cpuCore="${MEM_INFO}" # cpuCore="${MEM_INFO}"
fi # fi
else # else
cpuCore="1" # cpuCore="1"
fi # fi
if [ "$cpuCore" -gt "1" ];then if [ "$cpuCore" -gt "1" ];then
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`

Loading…
Cancel
Save