浏览代码

07env-install-centos.sh

lizw 2 年之前
父节点
当前提交
4035949188
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      00base/08jenkins-agent-install-centos.sh

+ 3 - 3
00base/08jenkins-agent-install-centos.sh

@@ -219,7 +219,7 @@ function init:mkdir() {
   log::info "[mkdir]" "创建目录..."
   local host="127.0.0.1"
   command::exec "${host}" "
-    mkdir -p ${BASE_DIR}
+    sudo mkdir -p ${BASE_DIR}
     sudo chown -R \\\$(id -u):\\\$(id -g) ${BASE_DIR}
   "
   check::exit_code "$?" "git" "$host 创建目录:${BASE_DIR}" "exit"
@@ -231,8 +231,8 @@ function init:git() {
   log::info "[git]" "安装git环境..."
   local host="127.0.0.1"
   command::exec "${host}" "
-    yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
-    yum -y install git
+    sudo yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
+    sudo yum -y install git
     git --version
     git config --global credential.helper store
   "