Rocky Linux 9 安装 Gitelab-ee(15.6.0-ee)

  •  安装

dnf update -y
dnf install postfix
systemctl enable --now postfix

wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh

chmod +x script.rpm.sh
os=el dist=8 ./script.rpm.sh

dnf repolist
dnf install gitlab-ee -y
  • 配置

vim /etc/gitlab/gitlab.rb
# external_url 'http://gitlab.example.com'
external_url 'http://10.1.xxx.xxx:8888'
  • 启动

gitlab-ctl reconfigure

# Default admin account has been configured with following details:
# Username: root
# Password: You didn't opt-in to print initial root password to STDOUT.
# Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.

# NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
  • 访问

# 查看密码,注意保存
cat /etc/gitlab/initial_root_password

# 访问地址:http://10.1.xxx.xxx:8888
# 默认账号:root
  •  常用命令

gitlab-ctl restart
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl status
  • 备份还原

# 备份
gitlab-rake gitlab:backup:create
cd /var/opt/gitlab/backups
ls -alh
du -k *.tar




# 还原
cd /var/opt/gitlab/backups
ls -alh
-rw-------.  1 git  git  380K Nov 25 11:35 1669347305_2022_11_25_15.6.0-ee_gitlab_backup.tar

mv 1669347305_2022_11_25_15.6.0-ee_gitlab_backup.tar 1669347305_gitlab_backup.tar

gitlab-ctl stop
gitlab-rake gitlab:backup:restore BACKUP=1669347305

# 或者不修改名称,直接还原也行
gitlab-rake gitlab:backup:restore BACKUP=1669347305_2022_11_25_15.6.0-ee
  •  其它

# 收集GitLab和系统信息
gitlab-rake gitlab:env:info

# 显示GitLab许可证信息
gitlab-rake gitlab:license:info

# 检查GitLab配置
gitlab-rake gitlab:check

gitlab-rake gitlab:gitlab_shell:check
gitlab-rake gitlab:gitaly:check
gitlab-rake gitlab:sidekiq:check
gitlab-rake gitlab:incoming_email:check
gitlab-rake gitlab:ldap:check
gitlab-rake gitlab:app:check


# 重建 authorized_keys 密钥索引文件
gitlab-rake gitlab:shell:setup


# 清除redis缓存
gitlab-rake cache:clear

# 测试TCP连接
gitlab-rake gitlab:tcp_check[gitlab.com,80]

# 显示 database migrations状态
gitlab-rake db:migrate:status

# 运行未完成的database migrations
gitlab-rake db:migrate

# 重建数据库索引
gitlab-rake gitlab:db:reindex

# 导入 common metrics
gitlab-rake metrics:setup_common_metrics

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值