首页 > 其他分享 >安装gitlab

安装gitlab

时间:2023-02-21 20:57:10浏览次数:28  
标签:cn gitlab ce yum https 安装

1.配置yum源

vim /etc/yum.repos.d/gitlab-ce.repo

内容

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
gpgcheck=0
enabled=1

以上资源地址根据具体情况可以换成阿里、网易等

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

2.更新本地yum缓存

yum makecache

3.更新系统软件库

安装gitlab之前,先更新以下系统软件库

yum update -y

4.安装gitlab依赖库

sudo yum install -y curl policycoreutils-python openssh-server perl

出现以下错误

Error: Unable to find a match: policycoreutils-python

参考了这篇文章也没有解决,后续直接不检查依赖安装

https://blog.csdn.net/P_L_Wen97/article/details/123329885

5.开启端口

开放http与https端口

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld

6. 启动sshd服务

systemctl enable sshd
systemctl start sshd

7. 安装 Postfix 以发送电子邮件通知

yum install -y postfix
systemctl enable postfix
systemctl start postfix

具体配置可以参考

https://docs.gitlab.cn/omnibus/settings/smtp.html

8.安装gitlab

安装可以参考官网的安装方式

https://gitlab.cn/install/

这里采用rpm包的安装方式,下载gitlab的rpm包,下载地址

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/

最新的发布版本gitlab-ce-15.8.3-ce.0.el7.x86_64 ,安装文件大小 1.1G

安装

rpm -ivh gitlab-ce-15.8.3-ce.0.el7.x86_64.rpm 

出现步骤 4.安装gitlab依赖库 的错误

直接不检查依赖安装

rpm -ivh gitlab-ce-15.8.3-ce.0.el7.x86_64 --force --nodeps

修改配置文件/etc/gitlab/gitlab.rb的配置项external_url

vi /etc/gitlab/gitlab.rb

指向服务器的ip地址

external_url 'http://192.168.10.66'

重新加载配置,并重启 GitLab 服务,执行命令

gitlab-ctl reconfigure
gitlab-ctl restart

获取root用户密码

cat /etc/gitlab/initial_root_password

9.附录

最终发现使用docker方式安装是最简单的

https://docs.gitlab.cn/jh/install/docker.html#使用-docker-engine-安装极狐gitlab
https://docs.gitlab.cn/jh/install/docker.html#使用-docker-compose-安装极狐gitlab

获取root用户密码

docker ps
docker exec -it 93789f8225b8 /bin/bash
cat /etc/gitlab/initial_root_password
参考
https://blog.csdn.net/m0_52091913/article/details/127009412

标签:cn,gitlab,ce,yum,https,安装
From: https://www.cnblogs.com/happyhuangjinjin/p/17142374.html

相关文章

  • Rocky Linux安装
    1.下载VirtualBox并安装https://www.virtualbox.org/wiki/Downloads2.下载RockyLinux选择Rocky-9.1-x86_64-dvd.iso镜像官网https://rockylinux.org/download......
  • poetry安装升级和换源
    一、安装pipinstall-U--userpippipxpipxinstallpoetrypoetry--version#Poetry(version1.3.2) 二、换源1.安装插件(https://github.com/arcesium/poe......
  • consul 安装使用
    安装dockerrun-d-p8500:8500-p8300:8300-p8301:8301-p8302:8302-p8600:8600/udpconsulconsulagent-dev-client=0.0.0.0 访问地址:http://192.168.244.......
  • 部署堡垒机2——安装MySQL8.0.32或8.0.28+
    MySQL的三大版本a)MySQLEnterpriseEdition:企业版本(付费)b)MySQLClusterCGE:高级集群版(收费)c)MySQLCommunityServer:社区版(开源) 登录MySQL官网https://www.mysql.com/d......
  • [Android 逆向]绕过小米需插卡安装apk限制
    1.确保自己手机是root的了2.给手机安装busybox,使可以用vi编辑文件安装方法:0.adbshellgetpropro.product.cpu.abi获得cpu架构信息arm64-v8a1.下载https......
  • python和pycharm的安装与使用
    Python如何下载与安装?最新版本不具备最好的兼容性与稳定性 系统解释器建议一个版本的就行 建议安装3.7-3.10之间的版本 安装时注意你的操作系统的位数64位操作系......
  • CentOS7 安装MySQL 8.0.28+
     MySQL的三大版本a)MySQLEnterpriseEdition:企业版本(付费)b)MySQLClusterCGE:高级集群版(收费)c)MySQLCommunityServer:社区版(开源) 登录MySQL官网https://www.mysql.com......
  • BurpSuite超详细安装教程
    BurpSuite超详细安装教程-功能概述-配置-使用教程一、介绍BurpSuite是渗透测试、漏洞挖掘以及Web应用程序测试的最佳工具之一,是一款用于攻击web应用程序的集成攻击测试平台......
  • 使用appuploader怎么安装测试​
    原文链接:​​http://kxdang.com/topic/appuploader/iosdev90.html​​首先我们来看安装测试这个模块,注意按照上面提示内容操作。​​1.安装测试​​​​2.上传IPA​​进入“......
  • Ubuntu22.04 安装Mongodb6.X
    Ubuntu22.04安装Mongodb6.X1、Mongodb简介1.1什么是MongoDB?Mongodb是一个跨平台的面向文档的NoSQL数据库。它使用带有可选模式的类似JSON的BSON来存储数据。应用程......