firewalld
以及开机自启动[root@centos7-node4 ~]# yum -y install curl policycoreutils openssh-server openssh-client postfix vim curl-devel
[root@centos7-node4 ~]# curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[gitlab@centos7-node4 gitlab]# sudo systemctl start postfix && sudo systemctl enable postfix
[root@centos7-node4 ~]# yum -y install gitlab-ce
[root@centos7-node4 ~]# openssl genrsa -out "/etc/gitlab/ssl/gitlab.yeecall.cn.key" 2048
[root@centos7-node4 ~]# openssl req -new -key "/etc/gitlab/ssl/gitlab.yeecall.cn.key" -out "/etc/gitlab/ssl/gitlab.yeecall.cn.csr"
[root@centos7-node4 ~]# openssl x509 -req -days 3650 -in "/etc/gitlab/ssl/gitlab.yeecall.cn.csr" -signkey "/etc/gitlab/ssl/gitlab.yeecall.cn.key" -out "/etc/gitlab/ssl/gitlab.yeecall.cn.crt"
[root@centos7-node4 ~]# openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048
[root@centos7-node4 ~]# chmod 600 /etc/gitlab/ssl/*
-rw------- 1 root root 424 Dec 22 22:44 /etc/gitlab/ssl/dhparams.pem
-rw------- 1 root root 1298 Dec 22 22:42 /etc/gitlab/ssl/gitlab.yeecall.cn.crt
-rw------- 1 root root 1082 Dec 22 22:40 /etc/gitlab/ssl/gitlab.yeecall.cn.csr
-rw------- 1 root root 1675 Dec 22 22:38 /etc/gitlab/ssl/gitlab.yeecall.cn.key
[root@centos7-node4 ~]# vim /etc/gitlab/gitlab.rb
external_url 'https://gitlab.yeecall.cn'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.yeecall.cn.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.yeecall.cn.key"
nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams.pem"
[root@centos7-node4 ~]# gitlab-ctl reconfigure
[root@centos7-node4 ~]# vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
server_name gitlab.yeecall.cn;
rewrite ^(.*)$ https://$host$1 permanent;
[root@centos7-node4 ~]# gitlab-ctl restart
wanghuideMBP:Desktop wanghui$ mkdir repo
wanghuideMBP:Desktop wanghui$ cd repo/
wanghuideMBP:repo wanghui$ git -c http.sslVerify=false clone https://gitlab.yeecall.cn/root/test-repo.git
wanghuideMBP:test-repo wanghui$ vim test.py
wanghuideMBP:test-repo wanghui$ git add .
wanghuideMBP:test-repo wanghui$ git commit -m "first commit"wanghuideMBP:test-repo wanghui$ git -c http.sslVerify=false push origin master
[root@centos7-node3 repo]# git -c ssl.Verify=false clone https://gitlab.yeecall.cn/root/test-repo.git #使用dev克隆代码
[root@centos7-node3 repo]# cd test-repo/
[root@centos7-node3 test-repo]# git checkout -b release-1.0 #创建分支
[root@centos7-node3 test-repo]# vim test.py #更改代码
print("this is a test code")
print("this is a test code for release-1.0")
[root@centos7-node3 test-repo]# git add .
[root@centos7-node3 test-repo]# git commit -m "release-1.0"
[root@centos7-node3 test-repo]# git -c http.sslVerify=false push origin release-1.0 #同步代码
用dev用户登陆gitlabweb页面,然后提出merge请求
创建merge请求
lead用户登陆gitlab批准合并请求。