ubuntu install and configure GitLab

I. Overview

GitLab is a web-based open source Git software warehouse manager, written in Ruby, including wiki, problem management, code review, monitoring, and continuous integration and deployment. It enables developers to create, review and deploy their projects.

There are three different versions of GitLab available, Community Edition (CE), Enterprise Edition (EE) and GitLab Managed Edition.

If you want to stay away from GitHub, GitLab is the first choice. It can import projects and issues from different sources, including GitHub, which makes the migration process hassle-free. The GitLab interface is well-designed, clean, and intuitive, and is similar to GitHub in terms of user experience and functionality.

Depending on the required use case, there are several ways to install GitLab. This tutorial describes the steps required to install and configure GitLab (CE) on an Ubuntu 18.04 system using the Omnibus package.

Two, installation

The official suggestion is to use scripts to directly perform the installation. If the network is not good, download the installation package directly.

Download the installation package and visit the link:

https://packages.gitlab.com/gitlab/gitlab-ce

Choose the latest version here, gitlab-ce_12.1.4-ce.0_amd64.deb

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_12.1.4-ce.0_amd64.deb/download.deb

Local installation

dpkg -i gitlab-ce_12.1.4-ce.0_amd64.deb

The following prompt appears, indicating successful installation

*.*.****************.*****************************,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,.
  

     _______ __  __          __
 / ____(_)/_//   ____ _//_
 // __// __/// __ `/ __ \
 //_////_//___//_///_/ /
 \____ /_/\__/_____/\__,_/_.___/

Modify configuration file

vim /etc/gitlab/gitlab.rb

Modify the following information

external_url 'http://192.168.10.123:80'......
gitlab_rails['time_zone']='Asia/Shanghai'
gitlab_rails['gitlab_email_from']='[email protected]'......
gitlab_rails['smtp_enable']=true
gitlab_rails['smtp_address']="smtp.163.com"
gitlab_rails['smtp_port']=25
gitlab_rails['smtp_user_name']="[email protected]"
gitlab_rails['smtp_password']="111111" #Client authorization password
gitlab_rails['smtp_domain']="163.com"
gitlab_rails['smtp_authentication']="login"
gitlab_rails['smtp_enable_starttls_auto']=true......
user["git_user_email"]="[email protected]"

Just modify the configuration file to reconfigure

sudo gitlab-ctl reconfigure

Check status

root@ubuntu:~# gitlab-ctl status
run: alertmanager:(pid 12758) 66s; run: log:(pid 12379) 219s
run: gitaly:(pid 12684) 70s; run: log:(pid 11883) 357s
run: gitlab-monitor:(pid 12721) 69s; run: log:(pid 12309) 240s
run: gitlab-workhorse:(pid 12708) 70s; run: log:(pid 12226) 264s
run: grafana:(pid 12781) 65s; run: log:(pid 12538) 113s
run: logrotate:(pid 12259) 253s; run: log:(pid 12268) 252s
run: nginx:(pid 12242) 259s; run: log:(pid 12250) 258s
run: node-exporter:(pid 12715) 69s; run: log:(pid 12296) 244s
run: postgres-exporter:(pid 12770) 65s; run: log:(pid 12399) 213s
run: postgresql:(pid 12004) 349s; run: log:(pid 12016) 346s
run: prometheus:(pid 12732) 69s; run: log:(pid 12351) 225s
run: redis:(pid 11840) 367s; run: log:(pid 11847) 364s
run: redis-exporter:(pid 12725) 69s; run: log:(pid 12330) 232s
run: sidekiq:(pid 12200) 271s; run: log:(pid 12211) 270s
run: unicorn:(pid 12171) 277s; run: log:(pid 12189) 276s

Visit web page

The first time you visit the Web page, you will be forced to change your password. Initial username/password: root/5iveL!fe

After changing the password, log in with the new password

After logging in, the effect is as follows:

Finally, attach GitLab commonly used commands:

Common commands Description
sudo gitlab-ctl reconfigure Reload the configuration, execute after each modification of the /etc/gitlab/gitlab.rb file
sudo gitlab-ctl status View GitLab status
sudo gitlab-ctl start start GitLab
sudo gitlab-ctl stop stop GitLab
sudo gitlab-ctl restart Restart GitLab
sudo gitlab-ctl tail View all logs
sudo gitlab-ctl tail nginx/gitlab_acces.log View nginx access log
sudo gitlab-ctl tail postgresql View postgresql log

Reference link for this article:

https://www.jianshu.com/p/49f60698b411

Recommended Posts

ubuntu install and configure GitLab
How to install and configure GitLab on Ubuntu 18.04
Install and configure MySQL on Ubuntu
Install and configure Docker in Ubuntu
Install JDK and configure environment variables on Ubuntu 16.04
How to install and configure Gogs on Ubuntu 18.04
How to install and configure Cyberpanel on Ubuntu 18.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure Elasticsearch on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and configure AppScale on Ubuntu 12.04
How to install and configure PostGIS on Ubuntu 14.04
ubuntu18.04 compile and install python3.8
Centos6.5 install and configure mongodb
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Install and configure Mono production environment on Ubuntu Server
ubuntu modify and configure ip address
Install and deploy Gerrit under Ubuntu
CentOS 8 - install and configure NFS service
Install nodejs and npm under Ubuntu 16.04
CentOS Minimal install and configure TIPS
Install and configure FreeIPA in Centos7
Nginx-ubuntu install Nginx and configure https
Compile and install QEMU under Ubuntu
Ubuntu uses Docker to install Gitlab
ubuntu18.04 install python2
ubuntu18.04 install docker
ubuntu12.04 install python3
Ubuntu install guide
[Daily] Win10 open and install ubuntu subsystem
Ubuntu install Elasticsearch and elasticsearch-analysis-ik word segmentation
ubuntu install nodejs
ubuntu 16 install asp.net
ubuntu install leanote
Install docker on ubuntu and basic usage
Ubuntu configure Tomcat
Install fonts on Ubuntu and switch default fonts
Ubuntu 18.04 source code compile and install ffmpeg4.1
ubuntu install Jenkins
Ubuntu install PHP and PHP Nginx configuration method
docker install ubuntu
ubuntu install elasticsearch
Install and uninstall CUDA and CUDNN on Ubuntu
Ubuntu configure Apache
CentOS 7 install Gitlab
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
Linux install Docker and run Ubuntu system
Ubuntu install ftp server and possible problems
How to install Ubuntu20.04 and install NVIDIA driver
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Configure node js and npm under Ubuntu 14.04
How to install Pycharm and Ipython on Ubuntu 16.04/18.04
VMware Fusion install CentOS7 and configure the network
How to install and configure Elasticsearch on CentOS 7