公司的gitlab由于停电,又崩了,每次停电都会崩掉。所以就想到自己学一下搭建gitlab代码中心,后面在搞一个jenkins自动发版学习一下,慢慢搞吧。
在弄的时候,发现Centos7居然在2024年6月31日停止维护了。这就离谱了,他的yum默认数据源也归档了。只能用阿里云等第三方的镜像数据源:
一、配置阿里云第三方yum数据源:
1、首先找到yum的配置文件:
cd /etc/yum.repos.d
找到CentOS-Base.repo文件
直接粘贴吧,懒得改:
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basear