CentOS7系统安装GitLab

本文详细描述了如何在清华大学开源软件镜像站下载并安装GitLabCE16.5.1forCentOS7,包括设置外部URL、配置主机名、安装RPM包、设置初始管理员密码,以及后续的语言和git客户端配置。
摘要由CSDN通过智能技术生成

1.清华大学开源软件镜像站中查找gitlab镜像,选择gitlab-ce社区免费版本

清华大学开源软件镜像站地址
在这里插入图片描述

2.清华大学开源软件镜像站中查找gitlab镜像,选择gitlab-ce社区免费版本

在这里插入图片描述

3.选择CnetOS版本el7

在这里插入图片描述

4.选择gitlab版本进行下载:gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm

在这里插入图片描述
在这里插入图片描述

5.rpm文件上传,gitlab安装

[root@localhost ~]# ls
anaconda-ks.cfg  gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm
[root@localhost ~]# yum install gitlab-ce-16.5.1-ce.0.el7.x86_64.rpm -y

6.gitlab无法检测到实例的有效主机名

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

7.为gitlab实例配置url访问地址,设置为当前主机ip地址

[root@localhost ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://10.62.158.200'

8.启动gitlab实例,安装完成,gitlab是开机自启的,不用设置

[root@localhost ~]# gitlab-ctl reconfigure
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.

9.登录gitlab网站,用户名为root,初始化密码在 /etc/gitlab/initial_root_password 文件中

网址 - http://10.62.158.200/users/sign_in

[root@localhost ~]# cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

Password: 4RsIjQr3oFuutObHhTbPgW3OGOsoIzuHFXyFOPjLn1Q=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

在这里插入图片描述
在这里插入图片描述

10.初始化密码会在登录后的24小时后自动删除,需要重新配置登录密码及界面语言

  • Preferences
    在这里插入图片描述
  • Language选择简体中文,然后点击Save changes保存配置,刷新页面即可生效
    在这里插入图片描述
  • 编辑个人资料
    在这里插入图片描述
  • 密码,修改密码后保存即可
    在这里插入图片描述

11.若要在服务器上进行git操作,需要安装git客户端

[root@localhost ~]# yum install git
  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值