首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Linux中部署GitLab版本控制

Linux中部署GitLab版本控制

作者头像
星哥玩云
发布2022-07-19 15:18:43
发布2022-07-19 15:18:43
7380
举报
文章被收录于专栏:开源部署开源部署

1.版本控制是指对软件开发过程中各种程序代码,配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一。

2.常用的版本控制工具: gitlab subversion

3.gitlab部署

//配置yum源 [root@linuxidc ~]# cd /etc/yum.repos.d/ [root@linuxidc yum.repos.d]# curl -o 163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo [root@linuxidc yum.repos.d]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/163.repo [root@linuxidc yum.repos.d]# sed -i 's/^enabled=.*/enabled=1/g' /etc/yum.repos.d/163.repo

//安装依赖包 [root@linuxidc ~]# yum -y install epel-release [root@linuxidc ~]# yum -y install epel-release git [root@linuxidc ~]# yum -y install curl openssh-server openssh-clients postfix cronie policycoreutils-Python

//启动postfix服务并设置开机自启 [root@linuxidc ~]# systemctl restart postfix [root@linuxidc ~]# systemctl enable postfix

//下载gitlabd 的rpm包 [root@linuxidc ~]# cd /usr/src/ [root@linuxidc ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/y um/el7/gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm

//安装gitlab [root@linuxidc src]# rpm -ivh gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm

//修改配置文件 [root@linuxidc src]# vim /etc/gitlab/gitlab.rb ……………… external_url 'http://192.168.209.12' #将此处设为gitlab的服务器IP地址或者域名 ………………

//重载配置文件并重启gitlab [root@linuxidc src]# gitlab-ctl reconfigure [root@linuxidc src]# gitlab-ctl restart

//查看当前的gitlab版本 [root@linuxidc src]# head -1 /opt/gitlab/version-manifest.txt gitlab-ce 11.2.1

//设置管理员密码 [root@linuxidc ~]# gitlab-rails console production user = User.where(id: 1).first            //id为1的是超级管理员 user.password = 'linuxidc'          //密码必须至少8个字符 user.save!                        //保存修改,若无问题将返回true exit

4.gitlab管理 在浏览器中使用gitlab服务器的IP访问,页面如下图所示:

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档