From 7d80fb31ce4eb1e0d7092c47b88855834d5270db Mon Sep 17 00:00:00 2001 From: dami Date: Mon, 1 Jun 2026 18:52:36 +0800 Subject: [PATCH 1/2] Update install.sh --- plugins/mtproxy/install.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/plugins/mtproxy/install.sh b/plugins/mtproxy/install.sh index 494fa03b5..b9d380a98 100755 --- a/plugins/mtproxy/install.sh +++ b/plugins/mtproxy/install.sh @@ -25,14 +25,25 @@ sysName=$(uname | tr '[:upper:]' '[:lower:]') ARCH=amd64 get_arch() { - echo "package main -import ( - \"fmt\" - \"runtime\" -) -func main() { fmt.Println(runtime.GOARCH) }" > /tmp/go_arch.go - - ARCH=$(go run /tmp/go_arch.go) + # 使用 bash 来识别架构 + local arch=$(uname -m) + case $arch in + x86_64|amd64) + ARCH=amd64 + ;; + aarch64|arm64) + ARCH=arm64 + ;; + armv7l|armv7) + ARCH=armv7 + ;; + i686|i386) + ARCH=386 + ;; + *) + ARCH=amd64 + ;; + esac echo "ARCH:${ARCH}" } From acddca54cdde3a1b11deb65923e2f1d42afd9338 Mon Sep 17 00:00:00 2001 From: dami Date: Mon, 1 Jun 2026 19:06:13 +0800 Subject: [PATCH 2/2] update --- scripts/install/alma.sh | 1 + scripts/install/amazon.sh | 1 + scripts/install/centos.sh | 1 + scripts/install/euler.sh | 1 + scripts/install/fedora.sh | 1 + scripts/install/rhel.sh | 1 + scripts/install/rocky.sh | 1 + 7 files changed, 7 insertions(+) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index 02b3030b5..9b3b757b0 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -23,6 +23,7 @@ yum install -y sshpass yum install -y libzstd-devel yum install -y postgresql-devel yum install -y brotli-devel +yum install -y vim-common SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'` if [ "$SSH_PORT" == "" ];then diff --git a/scripts/install/amazon.sh b/scripts/install/amazon.sh index 2b420026a..38068871f 100755 --- a/scripts/install/amazon.sh +++ b/scripts/install/amazon.sh @@ -30,6 +30,7 @@ yum install -y numactl yum install -y sshpass yum install -y libzstd-devel yum install -y brotli-devel +yum install -y vim-common SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'` if [ "$SSH_PORT" == "" ];then diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 0165d647f..c52f5c277 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -41,6 +41,7 @@ yum install -y sshpass yum install -y libzstd-devel yum install -y postgresql-devel yum install -y brotli-devel +yum install -y vim-common # if [ -f /usr/sbin/iptables ];then diff --git a/scripts/install/euler.sh b/scripts/install/euler.sh index 44d6fd9f2..e40bd38c6 100755 --- a/scripts/install/euler.sh +++ b/scripts/install/euler.sh @@ -41,6 +41,7 @@ yum install -y sshpass yum install -y libzstd-devel yum install -y postgresql-devel yum install -y brotli-devel +yum install -y vim-common # if [ -f /usr/sbin/iptables ];then diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh index ff402b15b..be0996501 100644 --- a/scripts/install/fedora.sh +++ b/scripts/install/fedora.sh @@ -21,6 +21,7 @@ yum install -y sshpass yum install -y libzstd-devel yum install -y postgresql-devel yum install -y brotli-devel +yum install -y vim-common dnf install crontabs -y SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'` diff --git a/scripts/install/rhel.sh b/scripts/install/rhel.sh index a1721e579..3c64e220f 100644 --- a/scripts/install/rhel.sh +++ b/scripts/install/rhel.sh @@ -47,6 +47,7 @@ $PKGMGR install -y sshpass $PKGMGR install -y libzstd-devel $PKGMGR install -y postgresql-devel $PKGMGR install -y brotli-devel +$PKGMGR install -y vim-common echo "install remi source" if [ "$VERSION_ID" == "9" ];then diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh index 29d19df63..f808bb5b3 100644 --- a/scripts/install/rocky.sh +++ b/scripts/install/rocky.sh @@ -31,6 +31,7 @@ yum install -y sshpass yum install -y libzstd-devel yum install -y postgresql-devel yum install -y brotli-devel +yum install -y vim-common if [ -f /usr/sbin/iptables ];then