参考地址:https://about.gitlab.com/downloads/
- 安装基础依赖服务
sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld- yum 安装 gitlab-ce
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
中国地区建议使用中国源(yum 源中加入以下说明的源) https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce
参考资料: https://docs.gitlab.com/ce/workflow/importing/migrating_from_svn.html
git push提示GitLab: The project you were looking for could not be found.
>git push -u origin master
...
remote: GitLab: The project you were looking for could not be found.
To http://192.168.150.162/xiemaomao/test.git
! [remote rejected] master -> master (pre-receive hook declined)
...原因: 原因是我对git-data 目录使用了链接.
解决:
修改 /etc/gitlab/gitlab.rb 配置 git_data_dirs 字段,我的目录路径是使用 ln -s 链接过去的,配置说明说不支持 symlink.官方注释说明说不能使用ln链接
### For setting up different data storing directory
###! Docs: https://docs.gitlab.com/omnibus/settings/configuration.html#storing-git-data-in-an-alternative-directory
###! **If you want to use a single non-default directory to store git data use a
###! path that doesn't contain symlinks.**
git_data_dirs({"default" => "/data/opt/gitlab/git-data"})其它参考: GitLab CI持续集成配置方案
选用的 Excutor 为 docker, docker 的使用请看以下说明.
由于中国网络问题连接 ** 官方源 ** 连接过于慢,需要选用中国源
[root@localhost ~]# more /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpgDocker默认连接官方镜像源, 中国网络问题需要修改镜像源地址
- Docker 中国
- DaoCloud源 需登录
- 官方docker 镜像源,镜像搜索 https://hub.docker.com/
- 网易蜂巢镜像源
{"registry-mirrors": ["http://hub.c.163.com"]}