架构

关闭防火墙

[root@gitlab ~]# systemctl stop firewalld
[root@gitlab ~]# systemctl disable firewalld

关闭SELinux

[root@gitlab ~]# setenforce 0
setenforce: SELinux is disabled

安装依赖组件

[root@gitlab ~]# yum -y install curl policycoreutils openssh-server openssh-clients postfix

下载gitlab-ce仓库

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

启动邮件服务器

[root@gitlab data]# systemctl start postfix
[root@gitlab data]# systemctl enable postfix

安装gitlab

安装omnibus gitlab-ce

omnibus相当于一键安装包,自动安装gitlab所依赖的所有组件

 yum -y install gitlab-ce

创建私钥与证书

[root@gitlab data]# mkdir /etc/gitlab/ssl
[root@gitlab data]# openssl genrsa -out "/etc/gitlab/ssl/gitlab.aubin.com.key" 2048 创建申请证书
openssl req -new -key "/etc/gitlab/ssl/gitlab.aubin.com.key" -out "/etc/gitlab/ssl/gitlab.aubin.com.csr
Country Name (2 letter code) [XX]:cn # 国家
State or Province Name (full name) []:bj # 省份
Locality Name (eg, city) [Default City]:bj # 城市
Organization Name (eg, company) [Default Company Ltd]:ctyun # 公司名
Organizational Unit Name (eg, section) []:ops # 部门
Common Name (eg, your name or your server's hostname) []:gitlab.aubin.com
Email Address []: Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []: 给申请证书签名
[root@gitlab data]# openssl x509 -req -days 3650 -in "/etc/gitlab/ssl/gitlab.aubin.com.csr" -signkey "/etc/gitlab/ssl/gitlab.aubin.com.key" -out "/etc/gitlab/ssl/gitlab.aubin.com.crt" 创建pem
openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048 修改权限
chmod 600 /etc/gitlab/ssl/*

配置gitlab

nginx['redirect_http_to_https'] = ture
nginx['ssl_client_certificate'] = "/etc/gitlab/ssl/gitlab.aubin.com.crt"
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.aubin.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.aubin.com.key"
nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams.pem"
nginx['listen_addresses'] = ['*']
nginx['listen_port'] = 9000

初始化所有配置

[root@gitlab ssl]# gitlab-ctl reconfigure

配置本地windows住的hosts文件

# gitlab
42.81.133.59 gitlab.aubin.com

浏览器访问

初次进入需要设置管理员密码(默认账号为root),前面配置了nginx为https访问,所以访问地址应该为https

https://IP:9000

nginx配置文件

修改配置文件后要重启gitlabgitlab-ctl restart

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

omnibus gitlab-ce安装的更多相关文章

  1. gitlab的安装和配置

    1 使用omnibus gitlab来安装gitlab 也就是说,将gitlab和它所需要的组件打一个包,即打一个bundle进行安装. 第一步,安装gitlab的源. curl https://pa ...

  2. 安装gitlab ce

    切换到root用户,安装相关依赖 yum install curl policycoreutils openssh-server openssh-clients service sshd restar ...

  3. gitlab的安装以及汉化

    gitlab的安装 首先在网上下载好任意版本gitlab的rpm包 推荐下面的地址: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gi ...

  4. gitlab centos 安装配置运维笔记

    写在前面 如果你需要一个git服务器,为企业或自己的团队托管代码而又不希望将代码仓库存储到第三方.你可以在自己的服务器上搭建一个gitlab. 本文为我在最初安装配置gitlab服务器的时候留存的笔记 ...

  5. docker下运行Gitlab CE+Jenkins+Nexus3+docker-registry-frontend

    DevOps - Gitlab CE - Jenkins - Nexus Gitlab CE https://hub.docker.com/r/gitlab/gitlab-ce/ https://do ...

  6. gitlab ce 中删除空项目之后,没有删除掉,访问500

    在VirtualBox中的gitlab ce,在管理页面的操作如下: 新建一个仓库名为test的仓库,并从gitlab中导入 导入失败,使用root用户登录,在 Admin Area -> Pr ...

  7. gitlab一键安装+配置(备份+LADP认证)

    gitlab一键安装+配置(备份+LADP认证) #gitlab一键安装 #centos6 mini, GitLab社区版 #参考官方最新文档 https://www.gitlab.com.cn/in ...

  8. GitLab的安装及使用教程

    1.配置yum源 vim /etc/yum.repos.d/gitlab-ce.repo 复制以下内容: [gitlab-ce] name=gitlab-ce baseurl=http://mirro ...

  9. Centos下的GitLab的安装汉化和数据备份以及管理员密码重置

    前言: 安装版本:gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm 下载地址: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yu ...

  10. Gitlab的安装

    # GitLab Server 的搭建 参考 https://about.gitlab.com/installation ## 1. 准备工作 以Centos7为例,准备一台至少内存为4G的机器. # ...

随机推荐

  1. UVa 568 - Just the Facts

    这道题和这几段牛代码让我见识了精简与高效.好好学习! http://blog.csdn.net/lyhvoyage/article/details/9307009

  2. 网页头部的声明应该是用 lang="";

    我们经常需要用缩写的代码来表示一种语言,比如用en表示英语,用de表示德语.ISO 639就是规定语种代码的国际标准.最早的时候,ISO 639规定的代码是,用两个拉丁字母表示一种语言,这被称为ISO ...

  3. 【Android】Android 发送短信和打电话的方法

    发送短信的方法 有两种方法可以实现发送短信,其一是使用intent-startActivity,URI数据格式为"smsto:num",调用的action为Intent.ACTIO ...

  4. ST-LINK使用注意

    利用ST-LINK下载程序注意事项: 1.接线 按照上面图对着自己的开发板连接相应的引脚就可以了. 2.keil5配置 线连接完之后,要对自己的工程进行相关的 配置才能正确进行下载. 首先选择ST-L ...

  5. opencv学习笔记——FileStorage类的数据存取操作

    OpenCV的许多应用都需要使用数据的存储于读取,例如经过3D校准后的相机,需要存储校准结果矩阵,以方便下次调用该数据:基于机器学习的应用,同样需要将学习得到的参数保存等.OpenCV通过XML/YA ...

  6. Linux下批量管理工具pssh使用记录

    pssh是一款开源的软件,使用python实现,用于批量ssh操作大批量机器:pssh是一个可以在多台服务器上执行命令的工具,同时支持拷贝文件,是同类工具中很出色的:比起for循环的做法,我更推荐使用 ...

  7. vue - 准备知识

    一.知识 http://www.cnblogs.com/majj/https://www.cnblogs.com/majj/category/1216624.html 阮一峰 es6http://es ...

  8. HTML实例 - 购物商场页面

    效果图 代码 https://coding.net/u/James_Lian/p/Shopping-page/git 示例 https://coding.net/u/James_Lian/p/Shop ...

  9. 【抓包】火狐浏览器F12

    页面请求服务器的get.post两种请求,还有其他种,但是其他中基本不用,所以只记住get和post两种请求方法即可. 1.get(当前页面向服务器传值--即请求服务器)---弊端--传值长度有限 F ...

  10. centos shell编程3【告警系统】 没有服务器端和客户端的概念 main.sh mon.conf load.sh 502.sh mail.php mail.sh disk.sh 第三十七节课

    centos shell编程3[告警系统]  没有服务器端和客户端的概念 main.sh mon.conf load.sh 502.sh mail.php mail.sh  disk.sh  第三十七 ...