一:gitlab-CentOS的安装
  1. 环境准备

 1 [root@1-231 ~]# cat /etc/redhat-release
2 CentOS Linux release 7.4.1708 (Core)
3 [root@1-231 ~]# uname -r
4 3.10.0-693.5.2.el7.x86_64
5
6 下载epel源
7 [root@1-231 ~]# wget http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
8 [root@1-231 ~]# rpm -ivh epel-release-latest-7.noarch.rpm
9 [root@1-231 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
10
11 关闭networkmanager和防火墙
12 [root@1-231 ~]# systemctl stop firewalld.service
13 [root@1-231 ~]# systemctl disable firewalld
14 [root@1-231 ~]# systemctl disable NetworkManager
15
16 关闭selinux并确认处于关闭状态
17 [root@1-231 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
18 [root@1-231 ~]# grep SELINUX=disabled /etc/selinux/config
19 SELINUX=disabled
20 [root@1-231 ~]# setenforce 0
21 setenforce: SELinux is disabled
22
23 更新系统并重启
24 [root@1-231 ~]# yum update -y && reboot

2. 安装gitlab

 1 [root@1-231 ~]# yum install curl policycoreutils openssh-server openssh-clients postfix -y
2 [root@1-231 ~]# systemctl start postfix
3 [root@1-231 ~]# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
4 [root@1-231 ~]# yum install -y gitlab-ce
5
6 由于网络问题,连接国外镜像连接超时,国内用户,建议使用清华大学的镜像源进行安装
7 [root@1-231 ~]# cat /etc/yum.repos.d/gitlab-ce.repo
8 [gitlab-ce]
9 name=gitlab-ce
10 baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
11 repo_gpgcheck=0
12 gpgcheck=0
13 enabled=1
14 gpgkey=https://packages.gitlab.com/gpg.key
15 [root@1-231 ~]# yum makecache
16 [root@1-231 ~]# yum install -y gitlab-ce

3. 在安装一个git客户端

1 [root@1-231 ~]# yum install -y git

4. 配置并启动gitlab-ce

 1 [root@1-231 ~]# gitlab-ctl reconfigure
2 #时间可能比较长,耐心你等待即可
3
4 gitlab常用命令:
5 关闭gitlab:[root@1-231 ~]# gitlab-ctl stop
6 启动gitlab:[root@1-231 ~]# gitlab-ctl start
7 重启gitlab:[root@1-231 ~]# gitlab-ctl restart
8 重载配置文件: gitlab-ctl reconfigure
9
10 可以使用gitlab-ctl管理gitlab,例如查看gitlab状态:
11 [root@1-231 ~]# gitlab-ctl status
12 run: gitaly: (pid 13265) 2545s; run: log: (pid 12780) 2590s
13 run: gitlab-monitor: (pid 13310) 2544s; run: log: (pid 12989) 2572s
14 run: gitlab-workhorse: (pid 13286) 2544s; run: log: (pid 12851) 2584s
15 run: logrotate: (pid 13155) 2547s; run: log: (pid 12896) 2580s
16 run: nginx: (pid 13198) 2547s; run: log: (pid 12874) 2582s
17 run: node-exporter: (pid 13205) 2546s; run: log: (pid 12967) 2574s
18 run: postgres-exporter: (pid 13367) 2543s; run: log: (pid 13066) 2558s
19 run: postgresql: (pid 13238) 2545s; run: log: (pid 12593) 2633s
20 run: prometheus: (pid 13354) 2543s; run: log: (pid 13025) 2564s
21 run: redis: (pid 13274) 2545s; run: log: (pid 12533) 2639s
22 run: redis-exporter: (pid 13293) 2544s; run: log: (pid 13008) 2566s
23 run: sidekiq: (pid 13386) 2542s; run: log: (pid 12760) 2596s
24 run: unicorn: (pid 13410) 2541s; run: log: (pid 12711) 2602s
25
26 提示:我们要保证80端口不被占用
27 我们可以查看一下端口
28 [root@1-231 ~]# gitlab-ctl restart
29 ok: run: gitaly: (pid 32816) 0s
30 ok: run: gitlab-monitor: (pid 32831) 1s
31 ok: run: gitlab-workhorse: (pid 32841) 0s
32 ok: run: logrotate: (pid 32850) 1s
33 ok: run: nginx: (pid 32892) 0s
34 ok: run: node-exporter: (pid 32898) 0s
35 ok: run: postgres-exporter: (pid 32906) 1s
36 ok: run: postgresql: (pid 32917) 0s
37 ok: run: prometheus: (pid 32926) 1s
38 ok: run: redis: (pid 32934) 0s
39 ok: run: redis-exporter: (pid 32938) 1s
40 ok: run: sidekiq: (pid 32946) 0s
41 ok: run: unicorn: (pid 32955) 0s
42
43 [root@1-231 ~]# lsof -i :80
44 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
45 nginx 32892 root 7u IPv4 81927 0t0 TCP *:http (LISTEN)
46 nginx 32893 gitlab-www 7u IPv4 81927 0t0 TCP *:http (LISTEN)
47 nginx 32894 gitlab-www 7u IPv4 81927 0t0 TCP *:http (LISTEN)

5. web:浏览器进行访问测试:192.168.1.231

提示:启动gitlab需要时间!

Web页面提示我们需要设置一个账号密码(我们要设置最少8位数的一个账号密码)我们设置密码为:12345678

默认用户是:root

密码是:12345678
我们在后面的页面设置用户名

gitlab-centos的安装的更多相关文章

  1. [转]Centos 7 安装部署 GitLab 服务器

    Centos 7 安装部署 GitLab 服务器 转自:https://www.jianshu.com/p/79bfded68899 文前说明 作为码农中的一员,需要不断的学习,我工作之余将一些分析总 ...

  2. CentOS 7 安装GitLab

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

  3. centos下gitlab私服完整安装部署(nginx+MySQL+redis+gitlab-ce+gitlab-shell+)

    系统环境cat /etc/redhat-release CentOS release 6.8 (Final) nginx -vnginx version: nginx/1.9.15 redis-cli ...

  4. 1、CentOS 6 安装GitLab

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

  5. 一、CentOS 7安装部署GitLab服务器

    一.CentOS 7安装部署GitLab服务器 1.安装依赖软件 yum -y install policycoreutils policycoreutils-python openssh-serve ...

  6. Centos中安装gitlab

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

  7. 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 ...

  8. 在RedHat/CentOS下安装Docker(不升级内核)

    由于内核版本问题,最初仅Ubuntu可以较好的支持Docker.不过,由于RedHat系列OS(REHL.CentOS)是目前主流的Linux服务器操作系统,所以令RedHat系列OS支持Docker ...

  9. Gitlab 社区版安装部署和维护指南

    因为我的个人网站 restran.net 已经启用,博客园的内容已经不再更新.这篇文章是在 Gitlab 7.4 的环境下配置的,相关内容可能已经过时. 后续做了一次迁移,将 Gitlab 升级到了 ...

  10. NoSql1 在Linux(CentOS)上安装memcached及使用

    前言:       今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...

随机推荐

  1. HDU - 1272-小希的迷宫(连通图+环的判断)

    上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走.但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了 ...

  2. [BUUOJ记录] [GXYCTF2019]BabyUpload

    CTF三大骗局:Baby Easy Funny,本题主要考察.htaccess文件解析文件.文件类型检测绕过 打开题目给了一个上传点,上传一个php文件看看过滤规则 “后缀名不能有ph”直接禁掉了所有 ...

  3. 基础Html重点——防健忘

    一.head标签重点 <head> <meta charset="utf-8"> <title>第二天课</title> <! ...

  4. leetcode刷题-56合并区间

    题目 给出一个区间的集合,请合并所有重叠的区间. 示例 1: 输入: [[1,3],[2,6],[8,10],[15,18]]输出: [[1,6],[8,10],[15,18]] 思路 通过设置一个移 ...

  5. Beauty Contest(POJ 2187)

    原题如下: Beauty Contest Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 42961   Accepted:  ...

  6. 面向对象--继承-通过super()来调用父类方法

    super()的使用 问题: class Master(object): def __init__(self): self.kongfu = "古法煎饼果子配方" # 实例变量,属 ...

  7. Book of Shaders 02 - 矩阵:二维仿射变换练习

    0x00 一些废话 如果要深入学习 CG (Computer Graphics,计算机图形学),必然要学习相关的数学知识.CG 涉及到多个不同的领域,根据所研究领域的不同,也会涉及到不同的数学分支.但 ...

  8. 第3章 02 python字符串类型及操作

    字符串切片 取字符串从结尾到开头,相当于字符串逆序 转义符 转义符表达特定字符的本意 转义符    \“      ---->    ” 字符串操作符 例子: 获取星期字符串 定义星期 获取用户 ...

  9. 【域控日志分析篇】CVE-2020-1472-微软NetLogon权限提升-执行Exp后域控日志分析与事件ID抓取

    前言:漏洞复现篇见:https://www.cnblogs.com/huaflwr/p/13697044.html 本文承接上一篇,简单过滤NetLogon漏洞被利用后,域控上的安全及系统日志上可能需 ...

  10. CVE-2020-0796(Windows SMBv3) RCE漏洞复现

    CVE-2020-0796 攻击机:win10:192.168.205.1 靶机win10:192.168.205.132 关闭defender防火墙 0x01 影响版本 Windows 10 190 ...