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.
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
*.*.****************.*****************************,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,.
_______ __ __ __
/ ____(_)/_// ____ _//_
// __// __/// __ `/ __ \
//_////_//___//_///_/ /
\____ /_/\__/_____/\__,_/_.___/
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
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