快速学会CentOS配置GitLab

2020-09-03 0 387 百度已收录

下载GitLab

亲测: CentOS 6.5 

安装依赖包:

yum install curl policycoreutils policycoreutils-python openssh-server openssh-clients

依赖包安装完成之后:

1: systemctl enable sshd
2: systemctl start sshd
3: yum install postfix
4: systemctl enable postfix
5: systemctl start postfix
6: firewall-cmd –permanent –add-service=http
7: systemctl reload firewalld

以上依赖安装完之后,下载gitlab:

centos 6系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
centos 7系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7

下载相对应系统的rpm包

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

安装rpm包

rpm -i gitlab-ce-8.0.0-ce.0.el6.x86_64.rpm

安装完成之后

vim /etc/gitlab/gitlab.rb

修改gitlab配置文件,访问IP:端口,  如果不修改默认80端口,进入文件之后,找到

external_url      #  这个变量

修改external_url变量

external_url ‘http://ip:端口’

修改完成之后退出并且保存

esc    +  wq

保存之后需要更新一下修改

gitlab-ctl reconfigure

重启gitlab

gitlab-ctl restart      # 重启

gitlab-ctl stop        #  停止

gitlab-ctl start        # 启动

gitlab-ctl status      # 查看状态

访问gitlab

输入你在  /etc/gitlab/gitlab.rb文件里定义的
external_url后边跟的ip就可以访问

快速学会CentOS配置GitLab

配置成功之后就会出现这个页面,  默认账号:root, 密码;password,  如果不对的话,请自行修改。

修改gitlab管理员账号密码

gitlab-rails console production

# 按下回车之后会出现
Loading production environment (Rails 4.1.1)

# 依次输入
irb(main):001:0> user = User.where(id:1).first
irb(main):002:0> user.password=’66668888′      # root密码
irb(main):003:0> user.save!

# 返回
true        # 表示修改成功

Ctrl+C 可以退出了

到了这里之后,gitlab就配置完成了,接下来就可以使用了。以上所有方法,亲测,全部有效。

# 修改gitlab  IP地址

vim /etc/gitlab/gitlab.rb

external_url ‘ip地址’

配置完成
重置命令:    gitlab-ctl reconfigure

重启命令:    gitlab-ctl restart

更多GitLab相关教程见以下内容

CentOS7安装GitLab、汉化及使用  https://www.linuxidc.com/Linux/2017-11/148223.htm
CentOS 7安装部署GitLab服务器  https://www.linuxidc.com/Linux/2017-06/144990.htm
CentOS 7.x上GitLab搭建详细教程  https://www.linuxidc.com/Linux/2017-12/149766.htm
CentOS 7安装部署GitLab服务器  https://www.linuxidc.com/Linux/2017-06/144990.htm
CentOS 7使用Docker搭建GitLab服务器  https://www.linuxidc.com/Linux/2018-04/151725.htm
Ubuntu 16.04搭建GitLab服务器 https://www.linuxidc.com/Linux/2018-01/150319.htm

GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里 

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

栗子博客 软件 快速学会CentOS配置GitLab https://www.lizi.tw/soft/9976.html

常见问题
  • 1、杰齐1.7仅适用于PHP5.2 2、需Zend支持 3、尽量使用宝塔面板 4、尽量使用Windows 系统,关关对Linux支持不太友好。
查看详情

相关文章

评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

快速学会CentOS配置GitLab-海报

分享本文封面