安装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. html5 canvas 奇怪的形状水平渐变(因为大多数的之前的文章把基础都打过了,所以开始写的快了,如果有不明白的,可以回顾下之前的)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. ftp 服务

    ftp 上传下载 yum install ftp -y ftp:192.168.1.1 上传 put file1 下载 get file2 直接方式 ftp get test.tar.gz 文件 ft ...

  3. Hive笔记之宏(macro)

    一.啥是宏 宏可以看做是一个简短的函数,或者是对一个表达式取别名,同时可以将这个表达式中的一些值做成变量调用时传入,比较适合于做分析时为一些临时需要用到很多次的表达式操作封装一下取个简短点的别名来调用 ...

  4. 在maven 2工程中加入iTextAsian支持(maven添加自定义jar包到本地仓库)

    最近需要在工程中加入JasperReports,其中要用到把报表导出为pdf文件的功能.JasperReports内部使用iText来输出pdf文档,而iText对中文是放在单独的包iTextAsia ...

  5. python2.7中MySQLdb的安装与使用详解

    Python2.7中MySQLdb的使用 import MySQLdb #1.建立连接 connect = MySQLdb.connect( '127.0.0.1', #数据库地址 'root', # ...

  6. aliyun EC2配置利用filezilla配置ftp服务

    项目需要在阿里云EC2虚拟主机上配置ftp服务器,看了阿里云的教程可以使用filezilla配置,但一直遇到了一些问题.现记录一些步骤,避免以后出现类似问题. 1安装filezilla server ...

  7. 【技巧总结】理解XXE从基础到盲打

    原文:http://agrawalsmart7.com/2018/11/10/Understanding-XXE-from-Basic-to-Blind.html 这篇文章中将讨论以下问题. XXE是 ...

  8. mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg

    mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg ...

  9. Scala工具库

    1. Scala json解析库:https://github.com/json4s/json4s

  10. .net4.0切换2.0时,SplitContainer”的对象强制转换为类型

    问 题:将dotnet framework 4.0 切换到2.0时,编译没有问题,在运行时出现如下错误:System.InvalidCastException: 无法将类型为“System.Windo ...