优化数据库安装,cpu不要飙到100%

This commit is contained in:
midoks
2022-08-07 23:12:17 +08:00
parent c731197e95
commit ade7600fa1
7 changed files with 28 additions and 0 deletions
+4
View File
@@ -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
+4
View File
@@ -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
+4
View File
@@ -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
+4
View File
@@ -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
+4
View File
@@ -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 ------
+4
View File
@@ -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
+4
View File
@@ -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