In the development of continuous integration, a set of automated tools is available to achieve twice the result with half the effort

Install Git

sudo apt-get install git

Install gitlab

1. Install the dependency package and run the following command

sudo apt-get install curl openssh-server ca-certificates postfix

2. After running the command, the same email configuration item will appear. Select Interent Site and then press Enter all the way

Open source software domestic mirror source
https://zhuanlan.zhihu.com/p/…

3, the use of a mirror image of tsinghua university https://mirror.tuna.tsinghua… .

GPG public key trusted by GitLab:

curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null

4. Switch to root and open the following file

vim /etc/apt/sources.list.d/gitlab-ce.list

Once open, add the following information:

deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main

Save the file

5. Install the Gitlab-CE version: Note that any version installed by command is the latest version of Gitlab.

sudo apt-get update
sudo apt-get install gitlab-ce

 

The above content appears, indicating that the installation is completed correctly.

6. Execute the following command to initialize GitLab

sudo gitlab-ctl reconfigure

The initialization of GITLAB is complete.

7. Open SSHD and postfix services

service sshd start

service postfix start

8. Open port 80 for network access through firewall

sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

9. Check that GitLab is installed correctly and is running. Enter the following command

sudo gitlab-ctl status 

10. The following contents appear, indicating that GITLAB is operating normally:

11. Enter the server IP address +:80 in the browser to access the Gitlab page 12. For the first login, you need to set the root account password

After setting the password, click “Change Your Passwd” to enter the login page. The login name is root, and the password is the password set in the previous step. Click “Login”.

 

At this point, your GitLab is already accessible and usable