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}" } 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