gitLab私服如何配置部署

系统 centos 7 64bit

1. 安装依赖软件

yum -y install policycoreutils openssh-server openssh-clients postfix

2.设置postfix开机自启,并启动,postfix支持gitlab发信功能

systemctl enable postfix && systemctl start postfix

3.下载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

我的是centos7,所以我在https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7中找了个gitlab-ce-10.8.4-ce.0.el7.x86_64.rpm版本,建议下载一个比较新的版本

下载rpm包并安装:

wget http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.4-ce.0.el7.x86_64.rpm

这里将https修改为http,不然会报错(无法验证 mirrors.tuna.tsinghua.edu.cn 的由 “CN=R3,O=Let's Encrypt,C=US” 颁发的证书: 颁发的证书已经过期)

安装rpm包时提示错误:依赖检测失败

rpm -ivh gitlab-ce-10.8.4-ce.0.el7.x86_64.rpm --nodeps --force 

解决方法:命令末尾加上--nodeps --force

 安装完成后出现上面的提示,按照提示修改配置文件中的url地址为本地服务器的地址

开始前,配置一个8899端口,重启防火墙 点击》》

firewall-cmd --zone=public --add-port=8899/tcp --permanent

firewall-cmd --reload
  • 修改为没有使用的端口即可:
[root@gitlab tools]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.171.129:8899'		#根据需要修改端口

登录并进行基本操作

gitlab-ctl start    			#启动所有 gitlab 组件;
gitlab-ctl stop        		#停止所有 gitlab 组件;
gitlab-ctl restart        	#重启所有 gitlab 组件;
gitlab-ctl status        		#查看服务状态;
gitlab-ctl reconfigure       	#启动服务;
vim /etc/gitlab/gitlab.rb     #修改默认的配置文件;
gitlab-rake gitlab:check SANITIZE=true --trace    #检查gitlab;
gitlab-ctl tail        		#查看日志;
修改密码后进行登录,登录的用户名为root

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值