安装GitLab没必要像网上说的配置那么复杂,也不要自行编译安装,直接使用Omnibus版本即可,也就是综合安装包,注意如下几点:

1、不需要替换Nginx,直接使用GitLab的原生集成,同时这种方式也方便以后的配置,对于网上的方法来说,这一步居然替换成其它的Nginx,不用原生自带的,那么不是给以后配置造成吭吗?!!!

2、对于SSL的配置统一不在GitLab配置,直接使用Nginx做反向代理做SSL。

3、在CentOS下配置postfix多半会错,解决方法参考:https://www.cnblogs.com/EasonJim/p/9944495.html

4、网上居然要配置sshd的服务?厉害?

5、对于firewalld的配置,我建议不要这个服务,改成iptables。

6、运维安装GitLab只要注意这几点:域名访问、仓库目录创建和迁移、邮件发送(后续讲解)

7、很多时候网上说GitLab国外的网址被墙?我检测了三大运营商的网络基本没什么问题,如果非要国内下载,可以参考这个网址配置:https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

8、GitLab官网的安装教程是企业版本,只有有两个关键字ce、ee,ce代表社区免费版,ee代表企业版。

9、GitLab默认账号密码:root/5iveL!fe,默认启动端口是80。

下面是安装脚本的思路,不一定每台机器可以使用,只提供一个思路:

# 安装依赖
yum install -y curl policycoreutils-python yum install -y postfix
systemctl enable postfix
systemctl start postfix
# fix postfix in centos bug
sed -i 's/inet_interfaces = localhost/inet_interfaces = all' /etc/postfix/main.cf
service postfix restart # 下载安装
wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.4.5-ce.0.el7.x86_64.rpm -O gitlab-ce-11.4.5-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-11.4.5-ce.0.el7.x86_64.rpm # 修改配置
# 域名(可选)
# sed -i 's/external_url \'http://gitlab.example.com\'/external_url \'http://gitlab.jsoft.com\'/g' /etc/gitlab/gitlab.rb
# 迁移目录
mv /var/opt/gitlab/git-data{,_bak}
mkdir -p /data/service/gitlab/git-data
chmod 775 /data
chmod 775 /data/service
chmod -R 775 /data/service/gitlab
rsync -av /var/opt/gitlab/git-data/repositories /data/service/gitlab/git-data/
ls -n /data/service/gitlab/git-data /var/opt/gitlab/git-data # 启动
gitlab-ctl reconfigure
gitlab-ctl restart

(安装可选)国外源安装:

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

(安装可选)国内源安装:

cat > /etc/yum.repos.d/gitlab-ce.repo << EOF
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
EOF
# 更新源缓存
yum makecache # 安装CE版
yum install -y gitlab-ce

全自动脚本:https://github.com/easonjim/centos-shell/blob/master/gitlab/install-gitlab_11.4.5.sh

参考:

https://about.gitlab.com/install/#centos-7

https://cloud.tencent.com/developer/article/1010163

https://blog.csdn.net/huhuhuemail/article/details/80519433

https://my.oschina.net/gccr/blog/591410

https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

https://laravel-china.org/topics/2829/centos-7-install-gitlab-ce-community-edition-and-modify-the-default-nginx

CentOS 7安装GitLab 11.4.5的更多相关文章

  1. 1、CentOS 6 安装GitLab

    1.安装和配置必需的依赖项 在CentOS上将系统防火墙打开HTTP和SSH访问. sudo yum install -y curl policycoreutils-python openssh-se ...

  2. CentOS 6安装Gitlab

    1. 保证CentOS 6能连接网络 . 2.安装依赖: sudo yum install -y curl policycoreutils-python openssh-server cronie s ...

  3. CentOS 7 安装 Oracle 11.2.0.4

    一.安装环境 CentOS Linux release 7.2.1511 (Core) Oracle Database 11g Release 2 (11.2.0.4) 二.安装前准备 2.1 修改主 ...

  4. CentOS 7 安装GitLab

    CentOS 安装GitLab CentOS 安装GitLab GitLab是一个利用Ruby on Rails开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私 ...

  5. CentOS下安装Gitlab

    环境 Requirements 软件 版本 CentOS 6.6 Python 2.6 Ruby 2.1.5 Git 1.7.10+ Redis 2.0+ MySQL   GitLab 7-8-sta ...

  6. centos 7安装gitlab及使用

    GitLab 概述: 是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的 Git 项目仓库,可通过 Web界面迚行访问公开的戒者私人项目.Ruby on Rails 是一个可 ...

  7. Centos中安装gitlab

    安装依赖: sudo yum install curl openssh-server openssh-clients postfix cronie sudo service postfix start ...

  8. CentOS 7安装GitLab、汉化、配置邮件发送

    1.更换国内yum源 1.1 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 1.2 ...

  9. 阿里云服务器 centos 7 安装postgresql 11

    Postgresql简介 官方网站:https://www.postgresql.org/ 简介参考zhihu文章 https://www.zhihu.com/question/20010554 关于 ...

随机推荐

  1. 使用sso(cas)的时候报单点登录service不匹配问题分析及解决

    最近在使用portal做企业门户网站,其中使用了sso.在集成了多个应用之后在portal中点击集成的应用报错 2017-05-31 08:37:16,950 ERROR [org.jasig.cas ...

  2. casperjs 知乎登陆

    phantom.casperTest = true; phantom.outputEncoding="utf-8"; var fs = require('fs'); var cas ...

  3. Codeforces 600E - Lomsat gelral 「$Dsu \ on \ tree$模板」

    With $Dsu \ on \ tree$ we can answer queries of this type: How many vertices in the subtree of verte ...

  4. WCF客户端调用服务器端错误:"服务器已拒绝客户端凭据"。

    WCF客户端和服务器端不在同一台机器上时,客户端调用服务器端会报如下错误:"服务器已拒绝客户端凭据". 解决办法:在服务端配置文件与客户端配置文件中加入下面红色部分

  5. MyISAM引擎和InnoDB引擎的特点

    随着MySQL的不断更新,由于各存储引擎功能特性差异较大,这篇文章主要是介绍如何来选择合适的存储引擎来应对不同的业务场景,朋友们可以根据业务需求,选择合适的存储引擎.^.^ MyISAM 特性 不支持 ...

  6. ERP渠道文档详细和修改(二十五)

    前端代码: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChannelD ...

  7. linux系统下创建lvm挂载到指定目录

    1 .背景 在企业中有时我们为方便安装软件.数据的管理,需要把安装软件.数据放到固定目录下,磁盘满了方便扩展,这里假如需要一个/data目录存放数据,并单独进行挂载. 2.操作步骤 2.1  划分磁盘 ...

  8. Axios 是一个基于 promise 的 HTTP 库

    Axios 是一个基于 promise 的 HTTP 库 vue项目中关于axios的简单使用 axios介绍 Axios 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.j ...

  9. OLAP和OLTP基础知识

    数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical Processing).O ...

  10. UVa140 Bandwidth 小剪枝+双射小技巧+枚举全排列+字符串的小处理

    给出一个图,找出其中的最小带宽的排列.具体要求见传送门:UVa140 这题有些小技巧可以简化代码的编写. 本题的实现参考了刘汝佳老师的源码,的确给了我许多启发,感谢刘老师. 思路: 建立双射关系:从字 ...