Version control gitlab

Keywords: GitLab yum RPM EPEL

Version control gitlab

Version control definition:

It refers to the management of changes of various program codes, configuration files, instruction documents and other files in the process of software development

Version control function

1. Tracking document changes
2. Parallel development
3. Effectively solve the problems of version synchronization and development communication between different developers, and improve the efficiency of collaborative development
Version control is the core function of software configuration management.

Version control tools

gitlab
subversion

gitlab deployment

To configure yum source
[root@arongya ~]# cd /etc/yum.repos.d/
[root@arongya yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
--2018-09-04 17:58:12--  http://mirrors.163.com/.help/CentOS7-Base-163.repo
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1572 (1.5K) [application/octet-stream]
Saving to: 'CentOS7-Base-163.repo'

100%[===========================>] 1,572       --.-K/s   in 0.001s  

2018-09-04 17:58:13 (1.45 MB/s) - 'CentOS7-Base-163.repo' saved [1572/1572]
[root@arongya yum.repos.d]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS7-Base-163.repo 
[root@arongya yum.repos.d]# sed -i 's/^enabled=.*/enabled=1/g' /etc/yum.repos.d/CentOS7-Base-163.repo 
[root@arongya yum.repos.d]# yum -y install epel-release

Install git

[root@arongya ~]# yum -y install epel-release git

Install dependency package

[root@arongya ~]# yum -y install curl openssh-server openssh-clients postfix cronie policycoreutils-python

Start the postfix service and set the bootstrap

[root@arongya ~]# systemctl restart postfix
[root@arongya ~]# systemctl enable postfix

Download the rpm package of gitlab

[root@arongya ~]# cd /usr/src/
[root@arongya src]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm
[root@arongya src]# ls
debug  gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm  kernels

Install gitlab

[root@arongya src]# rpm -ivh gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm
warning: gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-11.2.1-ce.0.el7        ################################# [100%]
It looks like Gi tLab 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

Modify profile

[root@arongya src]# vim /etc/gitlab/gitlab.rb 
...//Omitted here
external_url 'http://gitlab.example.com'Modified into
external_url 'http://192.168.228.30'
....//Omitted here

Reload the configuration file and restart gitlab

[root@arongya src]# gitlab-ctl reconfigure
[root@arongya src]# gitlab-ctl restart

View the current version of gitlab

[root@arongya src]# head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 11.2.1

Set administrator password

[root@arongya ~]# gitlab-rails console production
-------------------------------------------------------------------------------------
 GitLab:       11.2.1 (2d6c1c6)
 GitLab Shell: 8.1.1
 postgresql:   9.6.8
-------------------------------------------------------------------------------------
Loading production environment (Rails 4.2.10)
irb(main):001:0> user = User.where(id: 1).first
=> #< user ID: 1 @ root > / / super administrator with ID 1
irb(main):002:0> user.password = 'yaoxiaorong!'
=> "yaoxiaorong!"   //Password must be at least 8 characters
irb(main):003:0> user.save!   //Save the modification and return true if there is no problem
Enqueued ActionMailer::DeliveryJob (Job ID: 41178696-d346-4b3b-8c34-7215f3bb5b5a) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):004:0> exit   //Sign out

gitlab management

Use the IP access of gitlab server in the browser, as shown in the following figure


Create a new user



Other

Posted by kratsg on Sat, 04 Jan 2020 23:50:41 -0800