本文介绍如何在CentOS7.2上搭建Gitlab服务器,并简单介绍如何使用。

Preface

  使用的是CentOS7.2的操作系统,安装当前最新版Gitlab服务器,下载地址:清华大学开源软件镜像站

gitlab-ce-12.0.-ce..el7.x86_64.rpm    610.5 MiB    -- :

  下载软件包。

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
# git --version
git version 1.8.3.1
# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.0.2-ce.0.el7.x86_64.rpm
# ls
gitlab-ce-12.0.2-ce.0.el7.x86_64.rpm

安装依赖

  gitlab依赖policycoreutils-python,需要先安装相关依赖。

# yum install -y policycoreutils-python

安装Gitlab服务器

  使用rpm -i 可直接安装相关软件包。

# rpm -i gitlab-ce-12.0.-ce..el7.x86_64.rpm
warning: gitlab-ce-12.0.-ce..el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
It looks like GitLab has not been configured yet; skipping the upgrade script. *. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,. _______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/ Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

  gitlab默认占用8080端口,因为我们这是临时测试使用,为了不被错杀,建议修改为其它非Web-like端口,如10101等其它端口。

修改端口

  修改gitlab配置文件。

# vim /etc/gitlab/gitlab.rb
...
external_url 'http://xx.xx.xx.xx:10101' # ip:port的形式

重新配置

  修改配置文件之后,需重新配置,执行如下命令。

# gitlab-ctl reconfigure
...
Running handlers:
Running handlers complete
Chef Client finished, / resources updated in seconds
gitlab Reconfigured!

启动服务

  配置完成之后,启动服务。

# gitlab-ctl restart
ok: run: alertmanager: (pid 3687) 0s
ok: run: gitaly: (pid 3697) 0s
ok: run: gitlab-monitor: (pid 3714) 0s
ok: run: gitlab-workhorse: (pid 3716) 1s
ok: run: grafana: (pid 3723) 0s
ok: run: logrotate: (pid 3742) 1s
ok: run: nginx: (pid 3750) 0s
ok: run: node-exporter: (pid 3756) 1s
ok: run: postgres-exporter: (pid 3765) 0s
ok: run: postgresql: (pid 3774) 1s
ok: run: prometheus: (pid 3777) 0s
ok: run: redis: (pid 3792) 0s
ok: run: redis-exporter: (pid 3816) 0s
ok: run: sidekiq: (pid 3904) 0s
ok: run: unicorn: (pid 3915) 0s

访问界面

  访问刚才在配置文件中设置的http://xx.xx.xx.xx:10101

设置管理员密码

  如下界面,设置管理员密码。

  可以选择登录或注册,使用root和刚才设置的管理员口令进行登录。

     目前空空如也。

  可以创建项目、组、添加用户和进行相关配置,这样Gitlab服务器便安装完成。

CentOS7 搭建gitlab服务器的更多相关文章

  1. Centos7 搭建Gitlab服务器并配置项目全过程

    https://blog.csdn.net/Abysscarry/article/details/79402695 gitlab与jenkins整合搭建      https://blog.csdn. ...

  2. centos7搭建Gitlab服务器

    虚拟机配置信息 内存最好大于或等于4G,之前用2G内存搭建,访问出现502报错信息 不考虑selinux和防火墙问题 搭建之前最好关掉selinux和防火墙 临时调增selinux和关闭防火墙 下载G ...

  3. centos7搭建gitlab服务器、汉化

    1.下载rpm安装包 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.8.5-ce.1.el7.x86_64.rp ...

  4. Centos7使用docker搭建gitlab服务器

    了解到docker的优点,搭建快,运行要求资源低,最重要的是实现的功能和效果都能达到预期,于是决定使用docker来搭建gitlab服务器. 效果图如下: 系统环境:CentOS Linux rele ...

  5. 搭建GitLab服务器

    前言 每一个开发工作者无非身处2中开发环境:1.开源环境  2.闭源开发环境,若你身处闭源环境或对自己代码安全性要求较高,搭建和使用自己GitLab服务器是必不可少的环节. 可以通过各种方式搭建自己的 ...

  6. Linux系统搭建GitLab---阿里云Centos7搭建Gitlab踩坑

    一.简介 GitLab,是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目安装. 它拥有与GitHub类似的功能,能 ...

  7. Ubuntu搭建Gitlab服务器

    想到Gitlab就必定会想到SVN,因为两者都是代码管理系统,作为开发人员来说,用习惯了SVN的图形化界面和SVN代码更新和提交的方式, 可能就会觉得使用git会比较麻烦,其实不然git使用起来非常方 ...

  8. CentOS7 搭建 SVN 服务器

    CentOS7 搭建 SVN 服务器 介绍SVN: SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统,它的设计目标就是取代CVS.互联网上 ...

  9. centos7 搭建WEB服务器

    centos7 搭建WEB服务器 2017年09月17日 09:44:50 逝然1994 阅读数:18321 标签: centosapacheweb服务器 更多 个人分类: centos服务器简单配置 ...

随机推荐

  1. OpenGL图形渲染管线、VBO、VAO、EBO概念及用例

    图形渲染管线(Pipeline) 图形渲染管线指的是对一些原始数据经过一系列的处理变换并最终把这些数据输出到屏幕上的整个过程. 图形渲染管线的整个处理流程可以被划分为几个阶段,上一个阶段的输出数据作为 ...

  2. python3 小技巧(2)

    原文 http://blog.csdn.net/jclass/article/details/6145078 一. base64 编码和解码任意的二进制字符串到文本字符串(主要用在HTTP EMAIL ...

  3. html5 模糊匹配搜索框

    使用bootstrap3-typeahead.js 文件在这里 引用: <script type="text/javascript" src="@Url.Conte ...

  4. SwiftCafe 咖啡时光 - 了解 Swift 中的闭包

    闭包(Closure) 是现代开发语言的必备特性,极大的提高了我们的开发效率. 关于闭包,你可以把它理解为一种特殊的变量或对象.简而言之,我们通常的对象,里面存储的是变量或对象的值,而闭包里面存储的是 ...

  5. ItemsPanelTemplate

    用以定义集合控件的容器外观,如ListBox,Combox 等等使用一个自定义的ListBox用以说明,其默认外观是上下排列,这里修改成横向排列 <Window.Resources> &l ...

  6. POST请求——HttpWebRequest

    string url=""; string param=""; string result = string.Empty; HttpWebRequest req ...

  7. WPF 通过CommandBinding捕获命令

    RoutedCommand与业务逻辑无关,业务逻辑是通过CommandBinding来实现 using System; using System.Collections.Generic;using S ...

  8. JS 小鸟飞

    <!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...

  9. Windows程序设计画图实现哆啦A梦

    在看雪论坛上看到的一个帖子,很喜欢,转载一下.原文地址:http://bbs.pediy.com/showthread.php?t=138630哆啦A梦是画出来的,不知道作者算这些坐标位置算了多久,真 ...

  10. 绕过010Editor网络验证(用python做一个仿真http server真容易,就几行代码)

    010Editor是一款非常强大的十六进制编辑器,尤其是它的模板功能在分析文件格式时相当好用!网上现在也有不少010Editor的破解版,如果没钱或者舍不得花钱买授权的话,去官方下载安装包再使用注册机 ...