How to install deployment under Linux Gitlab

Source: Internet
Author: User
Tags curl hosting port number

One, Gitlab introduction

Now, GitHub has become the preferred code-hosting platform. Because it's a lot of great features and simple to operate, almost all developers like it. Gitlab is a great git hosting service, almost as powerful as GitHub. Gitlab is generally used as an internal private system, if the company uses GIT distribution code, each time from the GitHub pull is very slow, the use of Gitlab is very convenient.

Second, install

The following is the official document installation instructions, please visit Gitlab website for more information

1, installation dependency

sudo yum install Curl Openssh-server openssh-clients postfix

sudo service postfix start

sudo chkconfig postfix on

sudo lokkit-s http-s ssh

2, add Gitlab Warehouse, and install to the server (because the package is relatively large, slow network speed can be considered in my FTP download, pay attention to choose your corresponding version)

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

sudo yum install Gitlab-ce

3, configure and start, the following command automatically configures and initializes the Gitlab

sudo gitlab-ctl reconfigure

4, start and log in

The following is the default username password, the first login will prompt you to modify the password:

Username:root

Password:5ivel!fe

Then you can have a pleasant toss!

Third, the installation of problems occurred

I heard that the Gitlab installation will appear in a lot of problems, but in the process of my installation seems to have not encountered many problems!

1, there are 502 errors in accessing Gitlab in the browser

The first is the port occupancy problem, Gitlab boot will use 80 port, so we recommend that you start Gitlab before you turn off the unwanted services, or modify the default port:

sudo vim/etc/gitlab/gitlab.rb

Modify the External_url, directly add the port number, for example, I use 8800 ports here:

External_url ' http://localhost:8800 '

Then execute:

sudo gitlab-ctl reconfigure

2,8080 Port Conflict

In addition to 80 this port, there is a unicorn port, the default is 8080, if 8080 ports are occupied by other programs. Then unicorn will fail to start, displaying 502 errors, "Gitlab is not responding".

Workaround: Modify/ETC/GITLAB/GITLAB.RB

unicorn[' Listen ']= ' 127.0.0.1 '

unicorn[' Port ']=8801

And then run:

sudo gitlab-ctl reconfigure

Four, Gitlab common commands

Gitlab-ctl start

Gitlab-ctl stop

Gitlab-ctl status

Gitlab-ctl restart

Gitlab The default log files are stored in the/var/log/gitlab directory:

Gitlab-ctl Tail #查看所有日志

Gitlab-ctl Tail Nginx/gitlab_access.log #查看nginx访问日志

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.