Gitlab安装用rpm方式及版本升级

#CentOS7安装Gitlab

#安装基础包
yum -y install curl policycoreutils openssh-server openssh-clients


#启动sshd
systemctl enable sshd
systemctl start sshd

#安装postfix
yum -y install postfix
systemctl enable postfix
systemctl start postfix


#添加防火墙规则
irewall-cmd --permanent --add-service=http
systemctl reload firewalld


wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.5.2-ce.0.el7.x86_64.rp

rpm -ivh gitlab-ce-10.5.2-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure
vi /etc/gitlab/gitlab.rb
修改项内容:external_url 'http://10.2.64.127:8899'

gitlab-ctl reconfigure

#配置并启动gitlab
gitlab-ctl reconfigure



################################################
#升级操作

#从8.5.2版本升级到11版本,不能直接跨大版本升级
#升级说明 https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-ctl stop nginx
rpm -Uvh gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm 
gitlab-ctl reconfigure
gitlab-ctl start


wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.8.0-ce.0.el7.x86_64.rpm
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-ctl stop nginx
rpm -Uvh gitlab-ce-11.8.0-ce.0.el7.x86_64.rpm 
gitlab-ctl reconfigure
gitlab-ctl restart postgresql
gitlab-ctl start

netstat -tunlp |grep 8899
#查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
head -1 /opt/gitlab/version-manifest.txt


rpm -qa|grep gitlab|xargs rpm -e

升级过程截图

Gitlab安装用rpm方式及版本升级_第1张图片

 

 

你可能感兴趣的:(Linux)