mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
优化数据库安装,cpu不要飙到100%
This commit is contained in:
@@ -51,6 +51,10 @@ Install_app()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ ! -f ${mariadbDir}/mariadb-${MY_VER}.tar.gz ];then
|
||||
|
||||
@@ -51,6 +51,10 @@ Install_app()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ ! -f ${mariadbDir}/mariadb-${MY_VER}.tar.gz ];then
|
||||
|
||||
@@ -51,6 +51,10 @@ Install_app()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ ! -f ${mariadbDir}/mariadb-${MY_VER}.tar.gz ];then
|
||||
|
||||
@@ -50,6 +50,10 @@ Install_mysql()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ ! -f ${mysqlDir}/mysql-5.5.62.tar.gz ];then
|
||||
|
||||
@@ -53,6 +53,10 @@ Install_mysql()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ Install_mysql()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
cd $serverPath/mdserver-web/plugins/mysql/lib && /bin/bash rpcgen.sh
|
||||
|
||||
@@ -92,6 +92,10 @@ Install_mysql()
|
||||
else
|
||||
cpuCore="1"
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
cd $serverPath/mdserver-web/plugins/mysql/lib && /bin/bash rpcgen.sh
|
||||
|
||||
Reference in New Issue
Block a user