UBUNTU16 Deployment Gitlab

Source: Internet
Author: User
Tags gpg

First, the installation of Gitlab

  1. Install dependent packages

1 $ sudo apt-get update

#如无ssh还需安装penssh-server

$ sudo apt-get install postfix ca-certificates-y//install postfix when selecting the Internet without smarthost

  2. Add the image source of Tsinghua University

1) Trust Gitlab's GPG public key

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

2) Add File Gitlab.list

$ sudo vim/etc/apt/sources.list.d/gitlab.list

----------------------------------------------------------------------->

Deb Https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial Main

3, Installation Gitlab-ce

$ sudo apt-get update$ sudo apt-get install Gitlab-ce

4, Configuration Gitlab

$ sudo gitlab-ctl reconfigure

  5. Start Postfix Service

$ sudo service postfix start

  6. Open 80 port

$ sudo iptables-a input-p tcp-m tcp--dport 80-j ACCEPT

  7, browser access gitlab:http://127.0.0.1: The first login needs to set a password, set up to log in, the default user is root.

Second, backup and recovery of Gitlab

  1. Backup Gitlab: The file is placed in the/var/opt/gitlab/backups directory by default 

 2. Restore Gitlab Backup

1) Copy the backup file to/var/opt/gitlab/backups

# Only one backup file in case of restoring $ sudo gitlab-rake gitlab:backup:restore# multiple backup files is required to specify the file $ sudo gitlab-rake gitlab:backup:restore backup= Backup file name

2) Modify the configuration file/etc/gitlab/gitlab.rb

$ sudo sudo vim/etc/gitlab/gitlab.rb

------------------------------------------------------------>

gitlab_rails[' backup_path ' = '/home/backup '  //'/home/backup ' is the backup file path

3) need to reset Gitlab after modification

$ sudo gitlab-ctl reconfigure

UBUNTU16 Deployment Gitlab

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.