Install Gitlab in Ubuntu 14.04

Source: Internet
Author: User

Install Gitlab in Ubuntu 14.04

GitLab:

GitLab is an open-source project used for warehouse management systems. A web service built on Git as a code management tool. It provides Git version control, code check, Bug tracking, and Wiki. It can perform security authentication and authorization through LDAP or the Active Directory. A single GitLab can support 25000 users, and it can also achieve high availability by setting multiple servers.

Follow the official documents:

Https://packages.gitlab.com/gitlab/gitlab-ce/install

Https://packages.gitlab.com/gitlab/gitlab-ce [command line apt-get or aptitude timeout]

Install the corresponding dependency and install the corresponding version:

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

Curl-s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

Sudo apt-get update & sudo apt-get install gitlab-ce = 7.11.4 ~ Omnibus-1

The above operation will cause a timeout, and the corresponding deb package will be downloaded directly using the given link.

Sudo wget-c https://downloads-packages.s3.amazonaws.com/Ubuntu-14.04/gitlab-ce_7.11.4 ~ Omnibus-1_amd64.deb (relatively slow, it is recommended to use thunder download upload)

Sudo dpkg-I gitlab-ce_7.11.4 ~ Omnibus-1_amd64.deb

Configure and enable gitlab:

Sudo gitlab-ctl reconfigure

Configure email address, URL:

# "=" Must be added below. GitLab does not have this equal sign when it is automatically generated. The error message "External URL must include a FQDN" is displayed.

External_url = "www.hostname.com"

# If Postfix or Sendmail is not installed, you need to set the following content based on the SMTP server parameters as the mail client does.

Gitlab_rails ['gitlab _ email_from '] = 'my. email@gmail.com'

Gitlab_rails ['gitlab _ email_reply_to '] = 'my. email@gmail.com'

Gitlab_rails ['smtp _ enable'] = true

Gitlab_rails ['smtp _ address'] = "smtp.gmail.com"

Githute_rails ['smtp _ port'] = 587

Gitlab_rails ['smtp _ user_name '] = "my.email@gmail.com"

Gitlab_rails ['smtp _ password'] = "my-gmail-password"

Gitlab_rails ['smtp _ domain '] = "smtp.gmail.com"

Gitlab_rails ['smtp _ authentication '] = "login"

Gitlab_rails ['smtp _ enable_starttls_auto'] = true

Gitlab_rails ['smtp _ tls '] = false

Gitlab_rails ['smtp _ openssl_verify_mode '] = 'peer'

# Can be: 'none', 'peer ', 'client _ once', 'fail _ if_no_peer_cert ', see http://api.rubyonrails.org/classes/ActionMailer/Base.html

Mailbox configuration reference: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/smtp.md

Enable registration:

Add: gitlab_rails ['gitlab _ signup_enabled '] = true to the/etc/gitlab. rb file.

Test:

Username: root

Password: 5 iveL! Fe

Complete Gitlab backup:

Use a command to create a complete Gitlab backup:

Gitlab-rake gitlab: backup: create

Use the above command to create a compressed package named 1296213186_gitlab_backup.tar under the/var/opt/gitlab/backupsdirectory. This compressed package is the complete Part of Gitlab, with 1393513186 starting with the backup creation date.

Gitlab modifies the default directory of the backup file

You can also modify the directory where the backup files are stored by default by modifying/etc/gitlab. rb:

Gitlab_rails ['backup _ path'] = '/mnt/backups'

Gitlab automatic backup

You can also use the crontab command to implement automatic backup:

Sudo/bin/su-root

Crontab-e

Add the following to implement automatic backup at every day:

0 2 ***/usr/bin/gitlab-rake gitlab: backup: create

Gitlab recovery

Likewise, Gitlab's recovery from backup is very simple:

# Stop related data connection services

Gitlab-ctl stop unicorn

Gitlab-ctl stop sidekiq

# Recovering from backup of 1296213186 #

Gitlab-rake gitlab: backup: restore BACKUP = 1296213186 # Only One backup file is in the backups directory.

(Determined based on the backup under/var/opt/gitlab/backups)

Start Gitlab

Sudo gitlab-ctl start

Gitlab migration

Migration is like the backup and recovery steps, you only need to copy the backup files under the/var/opt/gitlab/backups directory of the old server to the/var/opt/gitlab/backups directory of the new server (if you have not modified the default backup directory ).

However, you must note that the Gitlab version on the new server must be the same as the Gitlab version when the backup is created. for example, if the new server is installed with Gitlab of the latest version 7.60, you 'd better upgrade Gitlab of the old server to 7.60 before migration.

To modify the configuration, run the following command:

Sudo gitlab-ctl reconfigure

Add ing when accessing the Intranet through http or git over the Internet. You need to modify the nginx listening port and external_url and then add the port.

Install GitLab in Chinese with CentOS source code

Install GitLab on Ubuntu 12.04

GitLab 5.3 upgrade considerations

Deploy GitLab on CentOS (self-managed Git project repository)

Install GitLab 6.0.2 on RHEL6/CentOS6/ScientificLinux6

CentOS 6.5 GitLab installation tutorial and Related Problems

GitLab details: click here
GitLab: click here

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.