gitlab repository installation

gitlab repository installation

Download address

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://packages.gitlab.com/gitlab/gitlab-ce

Here we take gitlab-ce-14.3.0 as an example

Install dependencies

[root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
[root@ebs-139265 opt]# sudo systemctl enable sshd
[root@ebs-139265 opt]# sudo systemctl start sshd
### If you don’t have a firewall enabled, you don’t need to execute the following command.
[root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=http
[root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=https
[root@ebs-139265 opt]# sudo systemctl reload firewalld

[root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.ustc.edu.cn
 * epel: mirror.nyist.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Package curl-7.29.0-59.el7_9.1.x86_64 already installed and latest version
Package 4:perl-5.16.3-299.el7_9.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openssh-server.x86_64 0:7.4p1-22.el7_9 will be updated
---> Package openssh-server.x86_64 0:7.4p1-23.el7_9 will be an update
--> Processing Dependency: openssh = 7.4p1-23.el7_9 for package: openssh-server-7.4p1-23.el7_9.x86_64
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package openssh.x86_64 0:7.4p1-22.el7_9 will be updated
--> Processing Dependency: openssh = 7.4p1-22.el7_9 for package: openssh-clients-7.4p1-22.el7_9.x86_64
---> Package openssh.x86_64 0:7.4p1-23.el7_9 will be an update
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Running transaction check
---> Package openssh-clients.x86_64 0:7.4p1-22.el7_9 will be updated
---> Package openssh-clients.x86_64 0:7.4p1-23.el7_9 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================== ================================================== ================================================== ================================================== ==========================
 Package Arch Version Repository Size
================================================== ================================================== ================================================== ================================================== ==========================
Installing:
 policycoreutils-python x86_64 2.5-34.el7 base 457k
Update:
 openssh-server x86_64 7.4p1-23.el7_9 updates 459k
Installing for dependencies:
 audit-libs-python x86_64 2.8.5-4.el7 base 76k
 checkpolicy x86_64 2.5-8.el7 base 295k
 libcgroup x86_64 0.41-21.el7 base 66k
 libsemanage-python x86_64 2.5-14.el7 base 113k
 python-IPy noarch 0.75-6.el7 base 32k
 setools-libs x86_64 3.3.8-4.el7 base 620k
Updating for dependencies:
 openssh x86_64 7.4p1-23.el7_9 updates 510k
 openssh-clients x86_64 7.4p1-23.el7_9 updates 655k

Transaction Summary
================================================== ================================================== ================================================== ================================================== ==========================
Install 1 Package (+ 6 Dependent packages)
Upgrade 1 Package (+ 2 Dependent packages)

Total download size: 3.2 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/10): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:00:01
(2/10): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00:01
(3/10): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00:01
(4/10): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:01
(5/10): openssh-server-7.4p1-23.el7_9.x86_64.rpm | 459 kB 00:00:00
(6/10): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00:00
(7/10): policycoreutils-python-2.5-34.el7.x86_64.rpm | 457 kB 00:00:00
(8/10): openssh-7.4p1-23.el7_9.x86_64.rpm | 510 kB 00:00:01
(9/10): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:00
(10/10): openssh-clients-7.4p1-23.el7_9.x86_64.rpm | 655 kB 00:00:00
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------------
Total 1.7 MB/s | 3.2 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating: openssh-7.4p1-23.el7_9.x86_64 1/13
  Installing: setools-libs-3.3.8-4.el7.x86_64 2/13
  Installing: libcgroup-0.41-21.el7.x86_64 3/13
  Installing: audit-libs-python-2.8.5-4.el7.x86_64 4/13
  Installing: python-IPy-0.75-6.el7.noarch 5/13
  Installing: libsemanage-python-2.5-14.el7.x86_64 6/13
  Installing: checkpolicy-2.5-8.el7.x86_64 7/13
  Installing: policycoreutils-python-2.5-34.el7.x86_64 8/13
  Updating: openssh-clients-7.4p1-23.el7_9.x86_64 9/13
  Update: openssh-server-7.4p1-23.el7_9.x86_64 10/13
  Cleanup: openssh-server-7.4p1-22.el7_9.x86_64 11/13
  Cleanup: openssh-clients-7.4p1-22.el7_9.x86_64 12/13
  Cleanup: openssh-7.4p1-22.el7_9.x86_64 13/13
  Verifying: checkpolicy-2.5-8.el7.x86_64 1/13
  Verifying: openssh-7.4p1-23.el7_9.x86_64 2/13
  Verifying: libsemanage-python-2.5-14.el7.x86_64 3/13
  Verifying: python-IPy-0.75-6.el7.noarch 4/13
  Verifying: openssh-clients-7.4p1-23.el7_9.x86_64 5/13
  Verifying: openssh-server-7.4p1-23.el7_9.x86_64 6/13
  Verifying: policycoreutils-python-2.5-34.el7.x86_64 7/13
  Verifying: audit-libs-python-2.8.5-4.el7.x86_64 8/13
  Verifying: libcgroup-0.41-21.el7.x86_64 9/13
  Verifying: setools-libs-3.3.8-4.el7.x86_64 10/13
  Verifying: openssh-server-7.4p1-22.el7_9.x86_64 11/13
  Verifying: openssh-clients-7.4p1-22.el7_9.x86_64 12/13
  Verifying: openssh-7.4p1-22.el7_9.x86_64 13/13

Installed:
  policycoreutils-python.x86_64 0:2.5-34.el7

Dependency Installed:
  audit-libs-python.x86_64 0:2.8.5-4.el7 checkpolicy.x86_64 0:2.5-8.el7 libcgroup.x86_64 0:0.41-21.el7 libsemanage-python.x86_64 0:2.5-14.el7 python- IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-4.el7

Updated:
  openssh-server.x86_64 0:7.4p1-23.el7_9

Dependency Updated:
  openssh.x86_64 0:7.4p1-23.el7_9 openssh-clients.x86_64 0:7.4p1-23.el7_9
Complete!
[root@ebs-139265 opt]# sudo systemctl enable sshd
[root@ebs-139265 opt]# sudo systemctl start sshd
[root@ebs-139265 opt]#

Installation service

[root@ebs-139265 opt]# rpm -ivh gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm
warning: gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing... ################################# [100%]
Updating/installing...
   1:gitlab-ce-14.3.0-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 & amp;release=14-3

[root@ebs-139265 opt]#

Installation directory

/opt/gitlab

Configuration file directory

/etc/gitlab/gitlab.rb

Help document address

https://docs.gitlab.com/omnibus/settings/configuration.html

Execute command

## The system starts automatically by default and does not need to execute commands.
gitlab-ctl start #Start all services
gitlab-ctl restart#Restart all services
gitlab-ctl stop #Stop all services
gitlab-ctl restart nginx #Restart a single service, such as restarting nginx
gitlab-ctl status #View service status
gitlab-ctl reconfigure #Make the configuration file effective
gitlab-ctl show-config #Verify configuration file
gitlab-ctl uninstall #Delete gitlab (retain data)
gitlab-ctl cleanse #Delete all data and start over
gitlab-ctl tail <service name> View service logs
gitlab-ctl tail nginx #such as viewing the nginx log under gitlab
gitlab-rails console #Enter the console
gitlab-ctl help #View gitlab help information

Log command

tail -f /var/log/gitlab/gitlab-rails/production.log #View logs

Access address

http://211.149.160.12:9999

Administrator information

Account: root
Password: By default, Linux package installation automatically generates a password for the initial administrator user account (root) and stores it in /etc/gitlab/initial_root_password for at least 24 hours. For security reasons, this file will be automatically deleted by the first gitlab-ctl reconfigure after 24 hours.