From ce82ddf8597136439ec44d178ce05e8e6eed17df Mon Sep 17 00:00:00 2001 From: sdohuajia <63113882+sdohuajia@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:11:01 +0800 Subject: [PATCH] Update nexus.sh --- nexus.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nexus.sh b/nexus.sh index 31dc698..9561cfb 100644 --- a/nexus.sh +++ b/nexus.sh @@ -86,6 +86,13 @@ function start_node() { # 确保目录存在 mkdir -p /root/.nexus # 创建目录(如果不存在) + + # 更新系统并安装必要的软件包 + echo "更新系统并安装必要的软件包..." + if ! sudo apt update && sudo apt upgrade -y && sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip -y; then + echo "安装软件包失败。" # 错误信息 + exit 1 + fi # 检查并安装 Git if ! command -v git &> /dev/null; then