gitlab安装升级,以及报错解决(查看的官方文档以及网上信息)

gitlab安装

下载rpm包
13.3.6rpm

cd /opt/module 把安裝包放入此文件夹

vim gitlab-install.sh 添加脚本文件,并把下面代码放入脚本:

sudo rpm -ivh /opt/module/gitlab-ce-13.3.6-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
sudo yum install -y postfix
sudo service postfix start
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce
chmod +x gitlab-install.sh

运行

查看版本

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

​ 执行以下命令初始化 GitLab 服务,过程大概需要几分钟.

gitlab-ctl reconfigure

启动

gitlab-ctl start  

账号:root
密码:redhat123
禁止 Gitlab 开机自启动:
systemctl disable gitlab-runsvdir.service

启用 Gitlab 开机自启动:
enable gitlab-runsvdir.service

备份升级

备份:

gitlab-backup create

默认位置

# gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"

/var/opt/gitlab/gitlab-rails/shared/pages

官方包升级:

RHEL/CentOS 6 and 7
sudo yum install gitlab-ce

特定包升级

RHEL/CentOS 6 and 7
yum --showduplicates list gitlab-ce

RHEL/CentOS 6 and 7
yum install gitlab-ce-
yum install gitlab-ce-13.12.15-ce.0.el7

报错记录

GitLab external URL must include a schema and FQDN

解决办法
vi /etc/gitlab/gitlab.rb
将
external_url 'xxx'
改成
external_url= 'xxx'

你可能感兴趣的:(Linux,gitlab,linux,运维)