CentOS8安装GitLab(版本控制系统)

1、使用RPM包部署

下载软件包

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-13.7.0-ce.0.el8.x86_64.rpm

安装

rpm -ivh gitlab-ce-13.7.0-ce.0.el8.x86_64.rpm

日志输出

2、修改配置

安装完后可以发现以下信息,需要修改gitlab.rb配置文件

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

编辑 /etc/gitlab/gitlab.rb 文件,将默认的域名配置修改成需要使用的域名。

# vim /etc/gitlab/gitlab.rb

external_url 'http://gitlab.devops.com'

重新配置命令,不管是不是修改了配置文件,都要执行

gitlab-ctl reconfigure

3、服务运行命令

启动服务

gitlab-ctl start

重启服务

gitlab-ctl restart 

查看状态

gitlab-ctl status 

停止服务

gitlab-ctl stop

4、web访问

如果使用的是gitlab.devops.com,需要在dns或者本地hosts中添加解析记录

vi /etc/hosts
192.168.1.200 gitlab.devops.com

服务器开放80端口,就可以页面访问了。

第一次进入,需要设置用户密码,默认用户root,能够正常进入登录即可,安装完成。

5、语言改成中文

点右上角头像,进入Settings设置页面

进入Preference,翻到最后,找到Language,设置简体中文并保存。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值