代码配置仓库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成功

相关推荐
HIT_Weston4 小时前
47、【Ubuntu】【Gitlab】拉出内网 Web 服务:Nginx 事件驱动分析(一)
前端·ubuntu·gitlab
是垚不是土9 小时前
轻量化CICD落地:基于Jenkins与Supervisor的中小企业服务发布实践
运维·servlet·ci/cd·微服务·jenkins
一念一花一世界13 小时前
Arbess零基础学习 - 集成企业微信,使用企业微信扫描登录Arbess
ci/cd·企业微信·arbess
一念一花一世界14 小时前
Arbess零基础学习 - 集成钉钉,使用钉钉扫码登录Arbess
ci/cd·钉钉·arbess
HIT_Weston15 小时前
49、【Ubuntu】【Gitlab】拉出内网 Web 服务:http.server 单/多线程分析(一)
前端·ubuntu·gitlab
为什么要内卷,摆烂不香吗15 小时前
Dockerfile 与 Docker Compose 在 CI/CD 管道中的分工与配合方式
ci/cd·docker·容器
松☆15 小时前
自动化构建 OpenHarmony Flutter 应用:从本地脚本到 CI/CD 流水线实战
flutter·ci/cd·自动化
HIT_Weston15 小时前
48、【Ubuntu】【Gitlab】拉出内网 Web 服务:Nginx 事件驱动分析(二)
前端·ubuntu·gitlab
HIT_Weston16 小时前
46、【Ubuntu】【Gitlab】拉出内网 Web 服务:http.server 分析(三)
前端·ubuntu·gitlab
就叫飞六吧17 小时前
docker一键部署gitlab
docker·容器·gitlab