想认真好好学习cicd首先搭建一个自己的Git私有仓库,没想遇到了个坑,网络源。下面我不使用国外的源因为大多时候是不成功的。
安装步骤如下:yum安装些依赖的工具软件
yum install curl policycoreutils openssh-server openssh-clients postfix -y
# yum install curl policycoreutils openssh-server openssh-clients postfix -y
#systemctl start postfix # curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
关键点就是这了,这时候使用的最后的命令是使用的国外的gitlap源安装好几百兆,我是没安装成功。所以想到了国内清华源更新还可以。
修改yum的
]# vim gitlab_gitlab-ce.repo
[gitlab-ce] name=gitlab-ce baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7 repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key
我把直接插到最上面了,然后
yum makecache #你可以看见缓存了 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.jdcloud.com * extras: mirrors.huaweicloud.com * updates: mirrors.huaweicloud.com base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 gitlab-ce | 2.9 kB 00:00:00 https://packages.gitlab.com/gitlab/gitlab-ce/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 302 - Found Trying other mirror. https://packages.gitlab.com/gitlab/gitlab-ce/el/7/SRPMS/repodata/repomd.xml: [Errno 14] HTTPS Error 302 - Found Trying other mirror. updates | 2.9 kB 00:00:00 (1/9): extras/7/x86_64/filelists_db | 207 kB 00:00:05 (2/9): base/7/x86_64/other_db | 2.6 MB 00:00:08 (3/9): extras/7/x86_64/other_db | 100 kB 00:00:08 (4/9): base/7/x86_64/filelists_db | 7.3 MB 00:00:16 (5/9): gitlab-ce/primary_db | 3.2 MB 00:00:15 (6/9): gitlab-ce/other_db | 30 kB 00:00:04 (7/9): updates/7/x86_64/other_db | 215 kB 00:00:01 (8/9): updates/7/x86_64/filelists_db | 1.8 MB 00:00:38 (9/9): gitlab-ce/filelists_db
#
然后安装
# yum install gitlab-ce
安装成功就去配置吧!