Created
December 17, 2024 08:23
-
-
Save hustlyt/87635c7cee3dd69fb85b5c951d066ca1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
_red() { printf "\033[31m\033[01m$@\033[0m\n"; } | |
_green() { printf "\033[32m\033[01m$@\033[0m\n"; } | |
# 后续改成从其他位置获取 | |
# 拷贝tools.jar | |
[ -n "$JAVA_HOME" ] && [ ! -e "$JAVA_HOME/lib/tools.jar" ] && _green "拷贝tools.jar到$JAVA_HOME/lib/tools.jar" && wget -q http://10.0.197.134:666/jar/tools.jar -P $JAVA_HOME/lib | |
# 拷贝jps | |
[ -n "$JAVA_HOME" ] && [ ! -e "$JAVA_HOME/bin/jps" ] && _green "拷贝jps到$JAVA_HOME/bin/jps" && wget -q http://10.0.197.134:666/jar/jps -P $JAVA_HOME/bin && chmod +x $JAVA_HOME/bin/jps | |
# arthas下载地址(10.0.197.134:666) | |
arthas_download_url=http://10.0.197.134:666/jar/arthas/arthas-bin-4.0.0.zip | |
# arthas下载地址(github镜像站) | |
#arthas_download_url=https://mirror.ghproxy.com/https://github.com/alibaba/arthas/releases/download/arthas-all-4.0.0/arthas-bin.zip | |
# 下载arthas-boot.jar(全量包) | |
mkdir -p /data/temp/arthas && cd /data/temp && _green "下载arthas全量包到/data/temp/arthas" && wget -O arthas-bin.zip -q $arthas_download_url && unzip -n -q arthas-bin.zip -d /data/temp/arthas && rm -f ./arthas-bin.zip | |
_green "下载完成,请执行:cd /data/temp/arthas && java -jar arthas-boot.jar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment