代码配置仓库GitLab安装部署

Github是目前世界上代码行数最多的在线软件版本配置库平台,而Gitlab是Github对应的开源版本,本文主要描述Gitlab的安装部署。

|------------------------------------------------------|
| https://about.gitlab.com/ https://gitlab.cn/install/ |

如上所示,从官方网站中下载不同操作系统的版本,本文主要描述Centos的安装版本

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| sudo yum install -y curl policycoreutils-python openssh-server perl sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo systemctl reload firewalld |

如上所示,安装基础集成软件包、设置远程访问服务协议、设置防火墙安全访问协议、重启防火墙

|------------------------------------------------------------------------------------|
| curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash |

如上所示,设置Gitlab提供的Centos安装软件包仓库的网络地址

|-------------------------------------------------------------------------------------------|
| sudo EXTERNAL_URL="https://gitlab.codetest.com" yum install -y gitlab-jh gitlab-ctl start |

如上所示,Gitlab在Centos上安装成功、启动Gitlab实例、其使用NGINX作为代理服务器、postgresql作为数据库、redis作为缓存

|-----------------------------------|
| 192.168.0.102 gitlab.codetest.com |

如上所示,在Windows的host文件中配置Centos的IP地址与域名网址的映射关系

|------------------------------|
| https://gitlab.codetest.com/ |

如上所示,在本地Windows系统的浏览器中访问Centos中安装的Gitlab服务器网址

如上所示,登录Gitlab成功

如上所示,创建一个公共的新项目Git仓库test2023

|-----------------------------------------------|
| https://gitlab.codetest.com/root/test2023.git |

如上所示,获取test2023的项目地址

|-------------------------------------------------------------|
| ssh-keygen -t ed25519-sk cat ~/.ssh/id_ed25519.pub | clip |

如上所示,生成Git客户端访问Gitlab的秘钥以及公钥

如上所示,将id_ed25519.pub公钥的内容复制到Gitlab的SSH Keys配置项中

|------------------------------------------------------------------------------------|
| ssh -T git@gitlab.codetest.com git clone git@gitlab.codetest.com:root/test2023.git |

如上所示,在Git客户端中访问Gitlab的项目test2023成功

相关推荐
-KamMinG17 小时前
“从零到一:使用GitLab和Jenkins实现自动化CI/CD流水线”
自动化·gitlab·jenkins
柯南二号19 小时前
【Gitlab】Ubuntu 20.04服务器部署Gitlab
git·gitlab
QX_hao19 小时前
【gitlab】--安装部署
gitlab
Echoo华地1 天前
GitLab升级后仓库镜像信任证书导入问题
证书·gitlab·trust store·certificate·信任库·仓库镜像
一念一花一世界1 天前
DevOps实战(4) - 使用Arbess+GitLab+SourceFare实现Java项目自动化部署
gitlab·tiklab·arbess·开源cicd工具·sourcefare
赵孝正2 天前
GitLab 分支管理与 Push 问题全解析
大数据·elasticsearch·gitlab
wjs0402 天前
Git常用的命令
java·git·gitlab
至善迎风2 天前
版本管理系统与平台(权威资料核对、深入解析、行业选型与国产平台补充)
git·gitee·gitlab·github·svm
高旭的旭2 天前
Gitlab 配置自定义 clone 地址
svn·ssh·gitlab·code
一念一花一世界2 天前
DevOps实战(3) - 使用Arbess+GitLab+Hadess实现Java项目自动化部署
gitlab·jenkins·tiklab·arbess·开源cicd工具