From ac2f8aec11478e3b38f851789d4e05c0932c2de1 Mon Sep 17 00:00:00 2001 From: georgecao Date: Thu, 30 Apr 2020 16:35:02 +0800 Subject: [PATCH] add yum source. --- obs/tf/startup/worker_centos.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/obs/tf/startup/worker_centos.sh b/obs/tf/startup/worker_centos.sh index edb0ebd..d0b038e 100755 --- a/obs/tf/startup/worker_centos.sh +++ b/obs/tf/startup/worker_centos.sh @@ -44,7 +44,7 @@ function fn_config_disk() } if [[ $# -lt 4 ]];then - echo "please specify frontend host, source host and backend host and worker disk name, for instance: ./worker.sh 172.16.1.81 172.16.1.89 172.16.1.95 172.16.1.84 /dev/vdb" + echo "please specify frontend host, source host and backend host and worker disk name, for instance: ./worker_centos.sh 172.16.1.81 172.16.1.89 172.16.1.95 172.16.1.84 /dev/vdb" exit 1 fi frontend_host=$1 @@ -58,6 +58,10 @@ echo "Starting obs worker service with backend server ${backend_host}.." echo "Enabling sshd service if not enabled" systemctl enable sshd.service +echo "change yum source address" +mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup +curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo + echo "installing requirement packages" yum install -y ntpdate vim cpio curl perl-Compress-Zlib perl-TimeDate perl-Data-Dumper perl-XML-Parser screen psmisc bash binutils bsdtar lzma util-linux openslp lvm2 perl-Digest-MD5 git screen tmux wget expect -- GitLab