The minimum memory size of the server is 4 GB. Or 502!

Let’s go

  1. The following command will enable HTTP, HTTPS, and SSH access in the system firewall.Problems encountered in the current step

    Openssh-server yum install -y curl policycoreutils-python openssh-server The service is set to start systemctl upon startupenableSSHD // Start the SSH service systemctl start SSHD // Add HTTP or HTTPS services to Firewalld. Permanent indicates that the service takes effect permanently. If you do not add --permanent, the system becomes invalid after the next startup. Firewall-cmd --permanent --add-service= HTTP firewall-cmd --permanent --add-service= HTTPS // Restart firewall systemctl reload firewalldCopy the code
  2. Install Postfix to send notification emails.
    Postfix yum install postfix postfix yum install postfix postfix yum install postfixenablePostfix // Start postfix systemctl start postfixCopy the code
  3. Install wget for downloading plug-ins from the Internet.
    yum -y install wget 
    Copy the code
  4. Install the Vim editor.
    yum install vim -y
    Copy the code
  5. Add the GitLab package repository and install the installation packages.Each version of the installation package
    // Add GitLab image wget -- Content-disposition HTTP: / / https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/6/gitlab-ce-12.10.3-ce.0.el6.x86_64.rpm/download.rpm / / installation GitLab RPM -i GitLab - ce - 12.10.3 - ce. 0. El6. X86_64. RPMCopy the code
  6. Modify GitLab configuration file to specify server IP and custom port.Problems encountered in the current step
    If 8080 is used, change it to another port and enable the corresponding port on the firewall vim /etc/gitlab/gitlab.rb // Change external_url in the configuration file'http://ip:port'// Gitlab-ctl reconfigure // gitlab-ctl restartCopy the code
  7. Tests whether it is accessible.Problems encountered in the current step
    curl localhost:port/gitlab
    Copy the code
  8. If the following information is displayed, it is successful.
  9. Page visit GitLab
    • If no domain name is available, enter the server IP address and port number
    • The first access redirects directly to the Change Password screen to change the password

Problems encountered

  1. performfirewall-cmd --permanent --add-service=httpWhen promptFirewallD is not runningThe firewall is not enabled

    • throughsystemctl status firewalldThe firewalld is in dead state, that is, the firewall is disabled.
    • throughsystemctl start firewalldEnable the firewall.
    • Again throughsystemctl status firewalldCheck firewalld status. If running is displayed, firewalld is enabled.
  2. performgitlab-ctl reconfigureWhen promptedruby_block[wait for redis service socket] action run

    • Ctrl + CEnd forcibly.
    • performsystemctl restart gitlab-runsvdir
    • Performed againgitlab-ctl reconfigure
    • Performed againgitlab-ctl restart
  3. performgitlab-ctl restartpromptwarning: redis: unable to open supervise/ok: file does not exist

    • The solution is the same as problem 2
  4. If Linux is accessible, but remote access is not: this is probably because Centos firewall does not have open port numbers.

    • performfirewall-cmd --zone=public --add-port=8090/tcp --permanent
    • --zone // scope
    • --add-port=8090/ TCP // Add a port in the format of port/communication protocol
    • --permanent // The parameter takes effect permanently. If this parameter is not specified, the parameter becomes invalid after the system restarts
    • Systemctl stop firewalld.service // Disable the firewall
    • Systemctl start firewalld.service // Start the firewall
    • Firewall-cmd --reload // Restart the firewall
    • Firewall-cmd --zone=public --query-port=80/ TCP // Check whether the port is enabled on the firewall. Yes indicates that the port is enabled
  5. GitLab clears the cache

    • gitlab-rake cache:clear