Gitlab distributed version control system deployment and use

功能:代码管理
官方网站: https://about.gitlab.com/
CentOS-7.5 部署 gitlab 版本控制系统
[root@shell ~]#
[root@shell ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@shell ~]#
[root@shell ~]# uname -r
3.10.0-862.el7.x86_64
[root@shell ~]#
[root@shell ~]# yum install curl policycoreutils openssh-server openssh-clients
[root@shell ~]#
[root@shell ~]# systemctl start sshd
[root@shell ~]# systemctl enable sshd
[root@shell ~]#
[root@shell ~]# yum install postfix
[root@shell ~]# systemctl start postfix
[root@shell ~]# systemctl enable postfix
[root@shell ~]#
[root@shell ~]# systemctl stop firewalld
[root@shell ~]# systemctl disable firewalld
[root@shell ~]#
[root@shell ~]# setenforce 0
[root@shell ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
[root@shell ~]#
[root@shell ~]# getenforce
Permissive
[root@shell ~]#
[root@shell ~]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash #添加软件包存储库(yum源)
[root@shell ~]#
[root@shell ~]# yum list gitlab-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.tuna.tsinghua.edu.cn
  • extras: mirrors.tuna.tsinghua.edu.cn
  • updates: mirrors.tuna.tsinghua.edu.cn
    Available Packages
    gitlab-ce.x86_64 13.4.4-ce.0.el7 gitlab_gitlab-ce
    [root@shell ~]#
    [root@shell ~]# yum install gitlab-ce # Install gitlab-ce
    [root@shell ~]# rpm -qa gitlab-ce
    gitlab-ce-13.4.4-ce.0.el7.x86_64
    [root@shell ~]#
    [root@shell ~]# gitlab-ctl reconfigure #Initial configuration (no manual intervention during configuration)

At this time, go to gitlab-ce through the web page: http://192.168.64.128

Log in to gitlab-ce:

The home page is displayed as follows:

Create project:
Click "new project"

Edit the following page, after editing, click "create project" to create it:

The following page appears:

[root@shell ~]#
[root@shell ~]# ssh-keygen #Go to the server to generate the key

[root@shell ~]#
[root@shell ~]# cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRRHvegkZjHnI/rdBjymKu9zUPL1ahXWoAppDMtKb4MqxjoLwLkzVp8/Pt4K2ujGaIoAeMu1G8R5N4S3qHuF4ufCtli9mChkYER1BfpaZ9GHMjICX9geSrs3z2Dcw/w22tfZ1W8WoRt/xiUGVckC1c77qSQ00bPXB8aXtsEVqGCALvx2MQAMmtpWymGgv6nu04WKaygMeThu8NWvvknUgM9BtgdmJshyVyF6DpOsZLeQrsmaJssyT9i6vDr9HnVIYqXwb8hhhkijbf8A4zLEBRSI9VCFKR+9+SaD5xHntL21WSR4EvomH/3wbOdrE3hJdjoNryfkaR3bUMQzzotMTP root@shell
[root@shell ~]#
复制上面的密钥内容:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRRHvegkZjHnI/rdBjymKu9zUPL1ahXWoAppDMtKb4MqxjoLwLkzVp8/Pt4K2ujGaIoAeMu1G8R5N4S3qHuF4ufCtli9mChkYER1BfpaZ9GHMjICX9geSrs3z2Dcw/w22tfZ1W8WoRt/xiUGVckC1c77qSQ00bPXB8aXtsEVqGCALvx2MQAMmtpWymGgv6nu04WKaygMeThu8NWvvknUgM9BtgdmJshyVyF6DpOsZLeQrsmaJssyT9i6vDr9HnVIYqXwb8hhhkijbf8A4zLEBRSI9VCFKR+9+SaD5xHntL21WSR4EvomH/3wbOdrE3hJdjoNryfkaR3bUMQzzotMTP root@shell

Go to the violation page and click: "Add ssh key"

Paste the key into the key input part, and then click "Add key":

Then the following page appears:

Then switch to the project page, you can see the project you just created:

Use of Gitlab-ce:
1) Access the project through url and use: http://192.168.64.128/root/project_01 ;
2) Use through command line

You can click New File:

Then write some content:

Then the file test1 is created:

Gitlab distributed version control system deployment and use

Guess you like

Origin blog.51cto.com/14783377/2542492