GitLab--安装搭建

安装GitLab

关闭firewalld防火墙

systemctl stop firewalld

禁用防火墙开机启用

systemctl disable firewalld

关闭SELINUX并重启服务器--强制访问控制安全ce'lue

vi /etc/sysconfig/selinux  #将selinux设置为disable

reboot

安装GitLab所需的所有组件 --GitLab为用户可以快速上手,使用Omnibus进行综合性安装,并且通过shell脚本自动化配置

Omnibus Gitlab-ce package

安装Gitlab组件

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

配置YUM库

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

启动postfix邮件服务--发送任务通知

systemctl start postfix && systemctl enable postfix

参考链接:https://blog.csdn.net/rodulf/article/details/70224856

安装Gitlab-ce社区版本

yum install -y gitlab-ce

GitLab安装配置管理

证书创建与配置加载

Nginx SSL代理服务配置

初始化GitLab相关服务并完成安装

mkdir -p /etc/gitlab/ssl

创建私有密钥

openssl genrsa -out "/etc/gitlab/ssl/gitlab.example.com.key" 2048

根据私钥创建证书

openssl  req -new -key "/etc/gitlab/ssl/gitlab.example.com.key" -out "/etc/gitlab/ssl/gitlab.example.com.csr"

证书格式 证书有效时间 输出 引入私有密钥 输出

openssl x509 -req -days 365 -in "/etc/gitlab/ssl/gitlab.example.com.csr" -signkey "/etc/gitlab/ssl/gitlab.example.com.key" -out "/etc/gitlab/ssl/gitlab.example.com.crt"

创建pem证书

openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048

将所有文件设置为600权限

chmod 600 *

配置gitlab配置文件

vim /etc/gitlab/gitlab.rb

gitlab-ctl reconfigure

修改gitlab nginx

vim /var/opt/gitlab/nginx/conf/gitlab-http.conf

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值