The purpose of building Gitlab:
Easy to develop management code for the company
Features implemented by Gitlab:
1, closed the registration function of Gitlab
2, modified the default port
3. Chinese
0. Pre-Preparation
14.04 [email protected]: Install openssh-server[email protected]:install openssh-client[email protected]: Install git
1. Installation
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/trusty/main/g/gitlab-ce/ Gitlab-ce_8.8.0-ce.0_amd64.deb[email protected]:~# dpkg-i gitlab-ce_8. 8.0-ce.0_amd64.deb
2. Modify the configuration file
[Email protected]:~# vim/etc/gitlab/Gitlab.rbexternal_url'http://X.X.X.X:8088'... gitlab_rails['Time_zone'] ='Asia/shanghai'gitlab_rails['Gitlab_email_from'] ='[email protected]'... gitlab_rails['smtp_enable'] =truegitlab_rails['smtp_address'] ="smtp.163.com"gitlab_rails['Smtp_port'] = -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]"... .. unicorn['Listen'] ='127.0.0.1'unicorn['Port'] =8080#配置文件默认为8080, if other programs use 8080 port, need to fix other ports, otherwise the page error 502# as long as the configuration file will reconfigure[email protected]:~# gitlab-CTL Reconfigure
[Email protected]:~# gitlab-ctl Statusrun:gitlab-workhorse: (PID8160) 17578s; Run:log: (PID7476) 17625srun:logrotate: (PID3777) 3220s; Run:log: (PID7521) 17621srun:nginx: (PID24024) 11294s; Run:log: (PID7487) 17623srun:postgresql: (PID7218) 17650s; Run:log: (PID7217) 17650srun:redis: (PID7084) 17656s; Run:log: (PID7083) 17656srun:sidekiq: (PID22511) 11383s; Run:log: (PID7464) 17627srun:unicorn: (PID13402) 10110s; Run:log: (PID7424) 17633s
[Email protected]:~# NETSTAT-ANLT |grep 808TCP0 0 0.0.0.0:8088 0.0.0.0:*LISTEN TCP0 0 127.0.0.1:8089 0.0.0.0:*LISTEN TCP0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
#其中8089是unicore端口 because the host 8080 port is already in use by another program
3. Visit the Web page
- Sometimes 502 appears, you can refresh the webpage or reconfigure again.
- Sometimes requires sudo gitlab-ctl restart Nginx
- Initial access to the Web page will force you to change the password, initial username/password: root/5ivel!fe
- No Front desk Registration
After login: upper right corner Admin area--Settings- sign-in restrictions
and then save
Admin area---Users---Edit and then save
4. Chinese
# First check version [email protected]:~#Cat/opt/gitlab/embedded/service/gitlab-rails/VERSION8.8.0[email protected]:~# git clone https://Gitlab.com/larryli/gitlab.git[email protected]:~# CD gitlab/# Compare 8-8-stable (English) and 8-8-zh (after the Han) difference and then export to patch [email protected]:~# gitdifforigin/8-8-stable origin/8-8-zh >/tmp/8.8.diff# Apply patches [email protected]:~#sudo Patch-d/opt/gitlab/embedded/service/gitlab-rails-p1 </tmp/8.8.diff
Reprint Source: http://www.jianshu.com/p/49f60698b411
Deploy Gitlab under Ubuntu-—— based on 14.04 system