Gitlab installation (download zip)

You can install the RPM package directly by using commands on the official websiteOfficial website command installation

Environment Preparation (Server or VM)

Yum -y install policycoreutils openssh-server openssh-clients postfix yum -y install policycoreutils openssh-server openssh-clients postfix &&sudo systemctl start SSHD 3 Set postfix to start after the system starts. Yum install policycoreutils-python postfix install systemctl enable postfix && Systemctl start Postfix 4 (CentOS7) yum install policycoreutils-python-utils (CentOS8)Copy the code

PS: An error will be reported if the command is incorrect in special environments

Open SSH and HTTP services and reload the firewall list (this configuration is not required if the firewall is disabled) :

firewall-cmd --add-service=ssh --permanent firewall-cmd --add-service=http --permanent firewall-cmd --reload Firewall-cmd --zone=public --add-port=82/ TCP --permanent (the port corresponds to the port whose configuration is modified below) firewall-cmd --reloadCopy the code

Download the installation package and upload it to the server (Version 7/8: Select EL7 and EL8 from centos 7/8 based on the Linux version)

Download Address 1(Tsinghua Mirror) Download Address 2(official website address)

Gitlab-ce-13.5.7-ce.0.el8.x86_64. RPM (download latest version)

upload

Execute install command (note version)

The RPM -i gitlab - ce - 13.5.7 - ce. 0. El7. X86_64. RPMCopy the code

If this error occurs, the previous’ special environment dependency ‘command and’ version ‘are not compatible

Normal installation screen

Modify the configuration

Run the following command to modify the configuration file: vi /etc/gitlab/gitlab.rb Change the configuration file: (IP indicates the SERVER/VM IP address) external_url 'http://ip:82' nginx['listen_port'] = 82Copy the code

Start the

Reload the configuration file you just modified

Gitlab-ctl reconfigure gitlab-ctl restartCopy the code

Running handlers: There was an error Running gitlab-ctl reconfigure:…. The error may be that the memory is too small (THE 2G I gave can’t start, but 4G can).

Startup complete, access

Address: http://ip:82

!!!!!!!!! Attention!!!!!! : If the following is displayed, it is because the first access time is too long. Click Go Back or refresh several times

Access success page

You need to set the password for the first time and then log in with the account root + new password

Inside is to create groups to create users to create projects to operate such as….. Don’t go…