Centos8 中安装GitLab
Centos8 中安装GitLab
1,安装依赖
yum install -y curl policycoreutils-python openssh-server
centos8没有policycoreutils-python yum源,不用管
2,启动ssh并设置为开机自启动
systemctl enable sshd systemctl start sshd
3,添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效
systemctl start firewalld firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld
4,启动postfix
systemctl enable postfix systemctl start postfix
5,下载gitlab
去这个路径下找最新的: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8 ; 下面的命令对应也跟着修改
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
6,安装
rpm -i gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
成功如图:

7,编辑ip和端口
vim /etc/gitlab/gitlab.rb gitlab-ctl reconfigure gitlab-ctl restart
8,访问gitlab ip+端口
如果输入端口和ip一直无法响应,可以关闭防火墙
systemctl stop firewalld
如果访问502,查看
https://www.cnblogs.com/fuhua/p/15414744.html
14.之后在本机浏览器输入地址 http://ip+端口 提示502错误! 15.gitlab官方文档中说的是当CPU到达100%时会返回502错误,这个错误来自包Unicorn。 由于我们安装的gitlab是14.3.3版本,Unicorn包已被弃用,改名为Puma,所以我们可以初步判断是Puma包导致的502报错。 参考链接:502 Gateway Timeout after Unicorn spins at 100% CPU 16.输入命令top查看cpu占用状态,发现command为bundle这个操作占用了99.3%的cpu,这明显是不合理的。 17.实时打印 puma包的日志,发现输出"Errno::EADDRINUSE: Address already in use - bind(2) for "127.0.0.1" port 8080"。原因就很清晰了,是因为8080端口被占用。 #实时打印puma包的日志
sudo gitlab-ctl tail puma 15.查看占用端口为8080并且状态为LISTEN的进程 发现8080端口被进程Id:58799 进程名:nginx:maser 的进程占用了,这是gitlab自带的nginx默认的监听端口。 而包puma也需要监听8080端口,产生了冲突导致puma 执行build失败。 puma包在执行build失败之后会无限重试,导致了死循环把cpu跑到了100%。 netstat -anp |grep 8080 16.接下来只需要给puma包设置默认监听端口不是8080就好了,我这里设置为8081 vim /etc/gitlab/gitlab.rb 新增 puma['port'] = 8081 17.依次执行下面命令
复制代码 #停止gitlab
gitlab-ctl stop #重新加载gitlab配置
gitlab-ctl reconfigure #重新运行gitlab
gitlab-ctl restart #监视cpu状态
top 复制代码 18.可以看到两个CPU占用非常高的进程,此时如果您在本机访问搭建的gitlab地址,依旧会提示502。 因为此时gitlab正在构建,我们什么都不需要做。只需要等到这两个CPU占用很高的进程CPU降低后就可以访问了。 注:如果远程访问不是提示502错误,而是提示连接失败之类的。80%都是因为服务器防火墙限制或者云服务器提供商防火墙限制。 #停止服务器防火墙
sudo systemctl stop firewalld
重新配置并启动
gitlab-ctl reconfigure
gitlab-ctl restart
开启:
gitlab-ctl start
关闭:
gitlab-ctl stop
9,成功如图:

10,第一次登录需要修改root密码, 密码8位以上,修改完就可以登录
使用设置的新密码,登录

其他操作类似添加账号,仓库等等自己百度
Centos8 中安装GitLab的更多相关文章
- 在CentOS8中安装gitlab
安装 docker 及 docker-compose centos8 更新源 cd /etc/yum.repos.d/ sed -i 's/mirrorlist/#mirrorlist/g' /etc ...
- Centos中安装gitlab
安装依赖: sudo yum install curl openssh-server openssh-clients postfix cronie sudo service postfix start ...
- linux中安装gitlab和cicd(断网版)
1:先介绍一下怎么查找所需要的依赖包 #yum install rpmname--downloadonly --downloaddir=/rpmpath 例如:yum install gitlab-r ...
- CentOS8中安装maven
下载maven,具体目录可根据实际情况而定 # wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-mave ...
- Centos8中安装JDK1.8
在这里是通过yum命令进行安装的 安装前检查是否安装了jdk # java -version 如果使用 yum 安装的 jdk,请使用下面命令卸载 yum -y remove java-1.8.0-o ...
- CentOS8.1中搭建Gitlab服务器
依旧是写在前面的话♠:很多IT人从业N年也许都还没有亲自搭过一次Gitlab服务器,是不是?有木有?!通常都是背着自己的笔记电脑到一家公司入职,或入职后领到公司分配的电脑,然后分配了Git账号,拿了将 ...
- centos8中的MySQL卸载和安装
centos8中的MySQL卸载和安装 前言 前几天在自己的服务器上安装了一个NDB集群[而且还没有成功] 放弃治疗后用一台没有mysql的服务器实现了单机版本的集群. 本来以为这事到这就结束了,结果 ...
- CentOS安装gitlab,gerrit,jenkins并配置ci流程
CentOS安装gitlab,gerrit,jenkins并配置ci流程 By Wenbin juandx@163.com 2016/4/9 这是我参考了网上很多的文档,配置了这三个软件在一个机器上, ...
- CentOS安装gitLab服务器
首先利用gitlab-install-el6.sh安装,比较简单: (出处:http://www.linuxidc.com/Linux/2013-06/85754.htm) 1:如果有条件,提供一台全 ...
- Mac安装GitLab CE记录
0 REF REF1 原始的GitLab Documentation REF2 Installation-guide-for-GitLab-on-OS-X REF3 如何在Mac 终端升级ruby版本 ...
随机推荐
- Flutter statecontroller.update(MaterialState.disabled,false)无效
因为中间会调用 void initStatesController() { if (widget.statesController == null) { internalStatesControlle ...
- 裁员潮下,我月薪3W依旧坚挺
近几年来产品经理一直是求职市场中的香饽饽: 年薪20w起.没有专业限制.职业天花板高,甚至行业中一直流传着一句话:产品经理是CEO的学前班. 在各种光环的加持下,不少应届生或有转行打算的职场人都将目光 ...
- PPT导出高分辨率tif图片——用于学术论文
PPT导出的图片默认分辨率只有96dpi,但要到印刷品要求的图片分辨率最好是300dpi,学术论文也需要高清晰度的图片.要让PPT导出的图片分辨率达到300dpi,其实可以不用PS,直接修改系统注册表 ...
- password_encryption_type 和 pg_hba.conf 不匹配导致用户连不上
# 问题概述xxx客户新上一套opengauss数据库,在测试中用户输入正确的密码,提示用户密码错误,导致用户被锁# 问题原因password_encryption_type 和 pg_hba.con ...
- knife4j 整合springboot
1.添加依赖 <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife ...
- Webservice或WebAPi Post类型传参,类对象格式转换
有类: public class ImgInfo { public int fs { get; set; } public string FileName { get; set; } public s ...
- Lecture 1. Introduction and Basics - Carnegie Mellon - Computer Architecture 2015 - Onur Mutlu
1.Hamming Distance: 两个相同长度比特串对应位置的不同位的数量,一般使用 d(x,y) 来表示汉明距离.对两个比特串进行异或运算,统计结果为1的个数就是汉明距离. ======= ...
- Queries Gym - 100741A - 树状数组
给定 \(n\) 和 \(m\),对于 \(n\) 个数字 \(a_i\),进行下列三种操作: (1) + p r: 将 p 位置的元素加上 r, 输出此时 p 位置的值: (2) - p r : 将 ...
- Windows 操作
一.基础命令 1. 盘符切换:D:: 2. 查看当前目录文件:dir: 3. 当前盘符内目录切换:cd path: 二.其他命令 1. netstat:查看网络端口状态 A. 查看某一端口信息:net ...
- git 本地电脑重新装git后 更新github项目报错 fatal: detected dubious ownership in repository at
解决方法参考: fatal: detected dubious ownership in repository at 'D:/'之解决方法 1.今天在学习git的时候出现这个错误: 2.执行下面代码即 ...