From 5b8ff7e61250789c0d84a294bf8c6f70c94e5b3b Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 15:30:57 +0800 Subject: [PATCH 1/9] Update ubuntu.sh --- scripts/install/ubuntu.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index caf980e624..5ac73fa61d 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -39,9 +39,10 @@ apt install -y libncurses5-dev apt install -y software-properties-common apt install -y bzip2 -apt install -y libnuma1 -apt install -y libaio1 +apt install -y libnuma1 +apt install -y libaio1 apt install -y libmecab2 +apt install -y libaio-dev P_VER=`python3 -V | awk '{print $2}'` if version_ge "$P_VER" "3.11.0" ;then From 07f77024abdd9148acef613a90f1c0aa23fee2f5 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 15:57:26 +0800 Subject: [PATCH 2/9] update --- plugins/mysql-community/install.sh | 48 ++++++++++++++++++++++++++++++ scripts/install/ubuntu.sh | 5 +++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 16c9ad7d0c..17e22fdc1d 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -32,6 +32,54 @@ else fi +_os=`uname` +echo "use system: ${_os}" +if [ ${_os} == "Darwin" ]; then + OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh +elif grep -Eq "FreeBSD" /etc/*-release; then + OSNAME='freebsd' + pkg install -y wget unzip +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' + echo y | pacman -Sy unzip +elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then + OSNAME='centos' + yum install -y wget zip unzip +elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then + OSNAME='fedora' + yum install -y wget zip unzip +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' + yum install -y wget zip unzip +elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then + OSNAME='alma' + yum install -y wget zip unzip +elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then + OSNAME='debian' + apt update -y + apt install -y devscripts + apt install -y wget zip unzip +elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' + apt install -y wget zip unzip +else + OSNAME='unknow' +fi + +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + +# 针对ubuntu24进行优化 +if [ "$OSNAME" == "ubuntu" && "$VERSION_ID" ~ "24" ];then + cur_dir=`pwd` + cd /usr/lib/x86_64-linux-gnu + ln -s libaio.so.1t64.0.2 libaio.so.1 + ln -s libancursesw.so.6.4 libaio.so.6 + cd $cur_dir +fi + if [ "${2}" == "" ];then echo '缺少安装脚本...' exit 0 diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 5ac73fa61d..0c4ee86c37 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -41,8 +41,11 @@ apt install -y bzip2 apt install -y libnuma1 apt install -y libaio1 -apt install -y libmecab2 apt install -y libaio-dev +apt install -y libmecab2 +apt install -y numactl +apt install -y libaio1t64 + P_VER=`python3 -V | awk '{print $2}'` if version_ge "$P_VER" "3.11.0" ;then From 15f9edc5c7f626b82f64715624c5644dde436a6d Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 15:59:22 +0800 Subject: [PATCH 3/9] Update install.sh --- plugins/mysql-community/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 17e22fdc1d..73490df204 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -72,7 +72,7 @@ fi VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` # 针对ubuntu24进行优化 -if [ "$OSNAME" == "ubuntu" && "$VERSION_ID" ~ "24" ];then +if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then cur_dir=`pwd` cd /usr/lib/x86_64-linux-gnu ln -s libaio.so.1t64.0.2 libaio.so.1 From f58c03c42962b721f6bc9505ca988c013794ed2f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:00:05 +0800 Subject: [PATCH 4/9] Update install.sh --- plugins/mysql-community/install.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 73490df204..910240c6cb 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -38,33 +38,22 @@ if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' - zypper refresh elif grep -Eq "FreeBSD" /etc/*-release; then OSNAME='freebsd' - pkg install -y wget unzip elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then OSNAME='arch' - echo y | pacman -Sy unzip elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' - yum install -y wget zip unzip elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then OSNAME='fedora' - yum install -y wget zip unzip elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then OSNAME='rocky' - yum install -y wget zip unzip elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then OSNAME='alma' - yum install -y wget zip unzip elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' - apt update -y - apt install -y devscripts - apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' - apt install -y wget zip unzip else OSNAME='unknow' fi From adf3df510e4dbc24b57c45fb43328fbf170ada48 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:01:12 +0800 Subject: [PATCH 5/9] Update install.sh --- plugins/mysql-community/install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 910240c6cb..189d7a58d2 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -64,8 +64,15 @@ VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk - if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then cur_dir=`pwd` cd /usr/lib/x86_64-linux-gnu - ln -s libaio.so.1t64.0.2 libaio.so.1 - ln -s libancursesw.so.6.4 libaio.so.6 + if [ -f libaio.so.1 ];then + ln -s libaio.so.1t64.0.2 libaio.so.1 + fi + + if [ -f libancurses.so.6 ];then + ln -s libancursesw.so.6.4 libancurses.so.6 + fi + + cd $cur_dir fi From 178f844420cbfefff530aa22ddc25d6ba889e725 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:01:32 +0800 Subject: [PATCH 6/9] Update install.sh --- plugins/mysql-community/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 189d7a58d2..a01d037da9 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -68,8 +68,8 @@ if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then ln -s libaio.so.1t64.0.2 libaio.so.1 fi - if [ -f libancurses.so.6 ];then - ln -s libancursesw.so.6.4 libancurses.so.6 + if [ -f libncurses.so.6 ];then + ln -s libncursesw.so.6.4 libncurses.so.6 fi From 5d830ae2f88f0e3a7aea57829e9648959da3521e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:01:52 +0800 Subject: [PATCH 7/9] Update install.sh --- plugins/mysql-community/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index a01d037da9..dbb655c4a3 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -71,8 +71,6 @@ if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then if [ -f libncurses.so.6 ];then ln -s libncursesw.so.6.4 libncurses.so.6 fi - - cd $cur_dir fi From 6ac78d9eb6a95cdb31ef2c093603487f68ede203 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:06:51 +0800 Subject: [PATCH 8/9] Update install.sh --- plugins/mysql-community/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index dbb655c4a3..197524bcc6 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -64,11 +64,11 @@ VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk - if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then cur_dir=`pwd` cd /usr/lib/x86_64-linux-gnu - if [ -f libaio.so.1 ];then + if [ ! -f libaio.so.1 ];then ln -s libaio.so.1t64.0.2 libaio.so.1 fi - if [ -f libncurses.so.6 ];then + if [ ! -f libncurses.so.6 ];then ln -s libncursesw.so.6.4 libncurses.so.6 fi cd $cur_dir From d0e96eab91237fc3356b8a05fe3b17d6292c35e7 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 16:13:13 +0800 Subject: [PATCH 9/9] Update install.sh --- plugins/mysql-community/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 197524bcc6..35e594f48b 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -58,10 +58,10 @@ else OSNAME='unknow' fi -VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` +VERSION_ID=`cat /etc/*-release | grep 'VERSION_ID' | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` # 针对ubuntu24进行优化 -if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" ~ "24" ];then +if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ "24" ]]; then cur_dir=`pwd` cd /usr/lib/x86_64-linux-gnu if [ ! -f libaio.so.1 ];then