- 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