Gitlab 部署及升级
约 192 字
预计阅读 1 分钟
次阅读
gitlab部署
使用yum安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# yum install curl policycoreutils openssh-server openssh-clients
# systemctl enable sshd
# systemctl start sshd
# yum install postfix
# systemctl enable postfix
# systemctl start postfix
# firewall-cmd --permanent --add-service=http
# systemctl reload firewalld
# vi /etc/yum.repos.d/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
# yum install gitlab-ce
# gitlab-ctl reconfigure
# vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
# vi /var/opt/gitlab/nginx/conf/gitlab-http.conf
# vi /opt/gitlab/embedded/conf/nginx.conf
# vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
# vi /etc/gitlab/gitlab.rb
# git clone https://gitlab.com/xhang/gitlab.git
# cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
# git diff origin/8-8-stable origin/8-8-zh > /tmp/8.8.diff
# gitlab-ctl stop
# cd /opt/gitlab/embedded/service/gitlab-rails
# git apply /tmp/8.8.diff
# gitlab-ctl start
# /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml #将host改为192.168.2.169
|
gitlab升级
1
2
3
4
|
# wget https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/6/gitlab-ce-8.15.1-ce.0.el6.x86_64.rpm/download
# rpm -Uvh gitlab-ce-8.15.1-ce.0.el6.x86_64.rpm
# gitlab-ctl reconfigure
# gitlab-ctl restart
|