Centos installation GitLab tutorial

related sites

  • official website
  • installation documentation
  • It can be installed according to the official documentation, but errors may occur during the installation process. So it is best to install according to the process of this article. I am writing this article while installing.

Preparation

  • Install centos on vmware. Note here that gitlab takes up more memory, so you need to allocate at least 4G of memory.
  • It is recommended to use centos7 for centos, and errors may be reported for other versions. download link
  • download this
    insert image description here
  • After centos is installed, the default network is not enabled, perform the following steps to enable the network
    • cd /etc/sysconfig/network-scripts/
    • vi ifcfg-ens33
    • Modify the value corresponding to ONBOOT in the file to yes, save and exit
    • service network restart
  • install ssh service
    • yum install openssh-server

Install

  • install dependencies
    • sudo yum install -y curl policycoreutils-python openssh-server perl
    • sudo systemctl enable sshd
    • sudo systemctl start sshd
  • Configure mirroring
    • curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash
  • Install
    • sudo EXTERNAL_URL=“http://192.168.206.134” yum install -y gitlab-jh
    • The ip address here is the ip address of your centos virtual machine, don't make a mistake. Note here that the double quotation marks must be in English. It is best to type this command by yourself, and the quotation marks will become Chinese when I copy it. If the installation fails, execute rpm -e gitlab-jh to uninstall and reinstall.
    • The following interface appears, indicating that the installation is successful
      insert image description here

Common commands

  • Start: gitlab-ctl start
  • Stop: gitlab-ctl stop
  • Restart: gitlab-ctl restart
  • View service status: gitlab-ctl status

Effect

  • Start gitlab-ctl start after the installation is complete
    insert image description here
  • Then we enter the ip address of centos in the browser. The following interface appears, indicating that it is OK.
    insert image description here
  • If the input ip address cannot be accessed, check whether your centos firewall is closed, and close the command systemctl stop firewalld.service

Log in

  • Then log in on the web page, the default user name is root, and the password is in this file /etc/gitlab/initial_root_password
  • After successful login, the following interface will appear
    insert image description here

change Password

  • The password is stored in the /etc/gitlab/initial_root_password file and will only be saved for 24 hours. Either we write it down by ourselves or change a new password
  • Select gitlab configuration
    insert image description here
  • edit account
    insert image description here
  • Set a new password here. Passwords should be as long as possible and contain numbers and letters
    insert image description here
  • The setting is complete, save it. We can log in with the new password.
  • At this point, the installation is successful, and you can use gitlab.

create project

insert image description here

  • Create an empty project
    insert image description here
  • Fill in the name of the project to be created
    insert image description here
  • After the creation is successful, we can see our project on the main page
    insert image description here
  • Clone down, fill in username and password
    insert image description here
  • After pulling down the code, we add a file and submit it

insert image description here

  • You can see the submitted files under the project
    insert image description here

Guess you like

Origin blog.csdn.net/new9232/article/details/131860305