gitlab

版本控制gitlab

版本控制是指对软件开发过程中各种程序代码、配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一。版本控制最主要的功能就是追踪文件的变更。它将什么时候、什么人更改了文件的什么内容等信息忠实地了记录下来。每一次文件的改变,文件的版本号都将增加。除了记录版本变更外,版本控制的另一个重要功能是并行开发。软件开发往往是多人协同作业,版本控制可以有效地解决版本的同步以及不同开发者之间的开发通信问题,提高协同开发的效率。并行开发中最常见的不同版本软件的错误(Bug)修正问题也可以通过版本控制中分支与合并的方法有效地解决。
具体来说,在每一项开发任务中,都需要首先设定开发基线,确定各个配置项的开发初始版本,在开发过程中,开发人员基于开发基线的版本,开发出所需的目标版本。当发生需求变更时,通过对变更的评估,确定变更的影响范围,对被影响的配置项的版本进行修改,根据变更的性质使配置项的版本树继续延伸或产生新的分支,形成新的目标版本,而对于不受变更影响的配置项则不应发产生变动。同时,应能够将变更所产生的对版本的影响进行记录和跟踪。必要时还可以回退到以前的版本。例如当开发需求或需求变更被取消时,就需要有能力将版本回退到开发基线版本。在曾经出现过的季度升级包拆包和重新组包的过程中,其实就是将部分配置项的版本回退到开发基线,将对应不同需求的不同分支重新组合归并,形成新的升级包版本。
版本控制是软件配置管理的核心功能。所有置于配置库中的元素都应自动予以版本的标识,并保证版本命名的唯一性。版本在生成过程中,自动依照设定的使用模型自动分支、演进。除了系统自动记录的版本信息以外,为了配合软件开发流程的各个阶段。还需要定义、收集一些元数据来记录版本的辅助信息和规范开发流程,并为今后对软件过程的度量做好准备。当然如果选用的工具支持,这些辅助数据将能直接统计出过程数据,从而方便软件过程改进活动的进行。对于配置库中的各个基线控制项,应该根据其基线的位置和状态来设置相应的访问权限。一般来说,对于基线版本之前的各个版本都应处于被锁定的状态,如需要对它们进行变更,则应按照变更控制的流程来进行操作。
常用的版本控制工具:

  • gitlab
  • subversion

  • gitlab部署

[root@localhost ~]# dnf -y nstall epel-release
[root@localhost ~]# dnf -y install git curl openssh-server openssh-clients postfix cronie
[root@localhost ~]# wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
--2022-09-23 00:04:40--  https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
Resolving mirror.tuna.tsinghua.edu.cn (mirror.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirror.tuna.tsinghua.edu.cn (mirror.tuna.tsinghua.edu.cn)|101.6.15.130|:443... connected.

HTTP request sent, awaiting response... 200 OK
Length: 1136813194 (1.1G) [application/x-redhat-package-manager]
Saving to: 'gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm'

gitlab-ce-15.2.2-ce.0 100%[=========================>]   1.06G  11.3MB/s    in 1m 42s

2022-09-23 00:06:23 (10.6 MB/s) - 'gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm' saved [1136813194/1136813194]

[root@localhost ~]# ls
anaconda-ks.cfg  gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
[root@localhost ~]# dnf list all|grep policycoreutils-python
policycoreutils-python-utils.noarch                               2.9-20.el8                                                 baseos

[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm
--2022-09-23 00:11:45--  http://mirror.centos.org/centos/7/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm
Resolving mirror.centos.org (mirror.centos.org)... 54.169.224.98, 2401:78c0::e00e
Connecting to mirror.centos.org (mirror.centos.org)|54.169.224.98|:80... connected.

HTTP request sent, awaiting response... 200 OK
Length: 468316 (457K) [application/x-rpm]
Saving to: 'policycoreutils-python-2.5-34.el7.x86_64.rpm'

policycoreutils-pytho 100%[=========================>] 457.34K  1.05MB/s    in 0.4s

2022-09-23 00:11:46 (1.05 MB/s) - 'policycoreutils-python-2.5-34.el7.x86_64.rpm' saved [468316/468316]

[root@localhost ~]# ls
anaconda-ks.cfg                       policycoreutils-python-2.5-34.el7.x86_64.rpm
gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
[root@localhost ~]# rpm -qa | grep policy
selinux-policy-3.14.3-58.el8.noarch
policycoreutils-2.9-9.el8.x86_64
selinux-policy-targeted-3.14.3-58.el8.noarch
[root@localhost ~]# rpm -e policycoreutils
error: Failed dependencies:
        policycoreutils is needed by (installed) postfix-2:3.5.8-4.el8.x86_64
[root@localhost ~]# rpm -e policycoreutils --nodeps
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable --now firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# vim /etc/selinux/config
diabled
[root@localhost ~]# rpm -ivh --nodeps policycoreutils-python-2.5-34.el7.x86_64.rpm
warning: policycoreutils-python-2.5-34.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...

   1:policycoreutils-python-2.5-34.el7################################# [100%]
[root@localhost ~]# rpm -ivh gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm
warning: gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...

   1:gitlab-ce-15.2.2-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.

      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.

         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ / __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/

Thank you for installing GitLab!

GitLab was unable to detect a valid hostname for your instance.

Please configure a URL for your GitLab instance by setting external_url`
configuration in /etc/gitlab/gitlab.rb file.

Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-2

[root@localhost ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.29.140'
[root@localhost ~]# gitlab-ctl reconfigure
[2022-09-23T00:27:02+08:00] INFO: Started Chef Infra Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Chef Infra Client, version 17.10.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2022-09-23T00:27:02+08:00] INFO: *** Chef Infra Client 17.10.0 ***
[2022-09-23T00:27:02+08:00] INFO: Platform: x86_64-linux
[2022-09-23T00:27:02+08:00] INFO: Chef-client pid: 60844
[2022-09-23T00:27:04+08:00] INFO: Setting the run_list to ["recipe[gitlab]"] from CLI options
[2022-09-23T00:27:04+08:00] INFO: Run List is [recipe[gitlab]]
[2022-09-23T00:27:04+08:00] INFO: Run List expands to [gitlab]
[2022-09-23T00:27:04+08:00] INFO: Starting Chef Infra Client Run for localhost
[2022-09-23T00:27:04+08:00] INFO: Running start handlers
[2022-09-23T00:27:04+08:00] INFO: Start handlers complete.

Resolving cookbooks for run list: ["gitlab"]
[2022-09-23T00:27:05+08:00] INFO: Loading cookbooks [gitlab@0.0.1, package@0.1.0, logrotate@0.1.0, postgresql@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@0.1.0, consul@0.1.0, gitaly@0.1.0, praefect@0.1.0, gitlab-kas@0.1.0, gitlab-pages@0.1.0, letsencrypt@0.1.0, nginx@0.1.0, runit@5.1.3, acme@4.1.5, crond@0.1.0]
Synchronizing cookbooks:
[2022-09-23T00:27:05+08:00] INFO: Storing updated cookbooks/gitlab/libraries/account_helper.rb in the cache.

......

[root@localhost ~]# gitlab-ctl restart
ok: run: gitaly: (pid 76789) 0s
ok: run: logrotate: (pid 76832) 1s
ok: run: redis: (pid 76875) 0s
[root@localhost ~]# head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 15.2.2

Original: https://www.cnblogs.com/marymary/p/16721342.html
Author: 溜溜威
Title: gitlab

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/581507/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • ArrayList中的遍历删除

    例如我们有下列数据,要求遍历列表并删除所有偶数。 List myList = new ArrayList<>(Arrays.toList(new Integer[]{2…

    Linux 2023年6月13日
    095
  • [转帖]shell 学习之until语句

    404. 抱歉,您访问的资源不存在。 可能是网址有误,或者对应的内容被删除,或者处于私有状态。 代码改变世界,联系邮箱 contact@cnblogs.com 园子的商业化努力-困…

    Linux 2023年5月28日
    0106
  • Linux上安装并启动tomcat

    1、下载tomcat安装包 官网链接:https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.57/bin/ 2、将tomcat上…

    Linux 2023年6月6日
    0118
  • Guava中这些Map的骚操作,让我的代码量减少了50%

    Guava是google公司开发的一款Java类库扩展工具包,内含了丰富的API,涵盖了集合、缓存、并发、I/O等多个方面。使用这些API一方面可以简化我们代码,使代码更为优雅,另…

    Linux 2023年6月7日
    0116
  • RHCSA阶段笔记

    命令终端字段含义介绍 [root@localhost ~]# 解释: root:当前登录系统用户名(root超级管理员) localhost :当前主机名 :当前用户所在目录( 为…

    Linux 2023年5月27日
    087
  • 2017年腾讯 秋招软件开发笔试编程题回忆版

    2017 年腾讯 秋招软件开发笔试编程题回忆版 (所有题目大致描述如下,并非完整的题目回忆,但意思大致一样) 1、又一个魔法城市,城市里面有n个魔法城堡,序号为0,1,2。。。n-…

    Linux 2023年6月6日
    098
  • VMware 虚拟机图文安装和配置 Rocky Linux 8.5 教程

    前言这是《VMware 虚拟机图文安装和配置 AlmaLinux OS 8.6 教程》一文的姐妹篇教程,如果你需要阅读它,请点击这里。2020 年,CentOS 宣布:计划未来将重…

    Linux 2023年6月7日
    0224
  • 解决pip下载慢

    临时使用 可以在使用pip的时候加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple 设为默认 pip install pip -U -i…

    Linux 2023年6月13日
    090
  • Linux驱动编程1——内核编译

    1.安装必要的内核开发包,包括gcc、make、libncurses-dev。 $ apt-get install gcc make libncurses-dev 2.$ make…

    Linux 2023年6月8日
    097
  • centos7安装redis设置开机启动

    首先下载redis源码,并使用tar进行解压缩 wget http://download.redis.io/releases/redis-4.0.8.tar.gztar xvzf …

    Linux 2023年5月28日
    0102
  • 七种方案!探讨Redis分布式锁的正确使用姿势

    日常开发中,秒杀下单、抢红包等等业务场景,都需要用到分布式锁。而Redis非常适合作为分布式锁使用。本文将分七个方案展开,跟大家探讨Redis分布式锁的正确使用方式。如果有不正确的…

    Linux 2023年5月28日
    088
  • 回忆我的第一个软件项目

    2009年大学毕业我去了成都,一番面试后,入职武侯区磨子桥附近的一个小型创业公司。公司的主营业务是代理销售用友或者金蝶的ERP软件,创业团队都是川大毕业的。公司的办公条件很差,两间…

    Linux 2023年6月6日
    0110
  • Python导入cx_Oracle报错

    系统环境:RHEL5.4 python2.5(手动编译安装,系统带有2.4版本) 在使用python脚本访问数据库时,需要导入cx_Oracle模块 $>>>im…

    Linux 2023年6月14日
    082
  • MySQL安装和配置

    一、关闭防火墙并安装epel源 1、关闭selinux ①修改selinux的配置文件 [root@localhost ~]# vim /etc/selinux/config SE…

    Linux 2023年6月7日
    091
  • linux内核源代码组织结构

    linux版本 linux 3.6.24 第一个数字主版本号 第二个数字是偶数代表是稳定版 第三个代表修订次数 Original: https://www.cnblogs.com/…

    Linux 2023年6月7日
    0103
  • IP地址、子网掩码、网关、DNS的介绍

    &#x5BA2;&#x6237;&#x7AEF;:应用 C/S(客户端/服务器) B/S(浏览器/服务器); &#x670D;&#x52A1…

    Linux 2023年6月6日
    083
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球