Centos6 use yum source to install gitlab-ce private environment
Use Tsinghua image source to configure yum Source:
Vim/etc/yum. repos. d/gitlab. repo
[Gitlab-CE]
name=GitlabCE
baseurl=https:
//mirror
.tuna.tsinghua.edu.cn
/gitlab-ce/yum/el6/
enabled=1
gpgcheck=0
2. Install yum
Yum installgitlab-ce-y
3. gitlab configuration (/opt/gitlab. rb)
external_url'
# Configure the server IP address or domain name
# Configure email
gitlab_rails[
'time_zone'
]=
'UTC'
gitlab_rails[
'gitlab_email_enabled'
]=
true
gitlab_rails[
'gitlab_email_from'
]=
'gitlab2015@163.com'
gitlab_rails[
'gitlab_email_display_name'
]=
'APICloud_Gitlab'
gitlab_rails[
'gitlab_email_reply_to'
]=
'gitlab2015@163.com'
gitlab_rails[
'smtp_enable'
]=
true
gitlab_rails[
'smtp_address'
]=
"smtp.163.com"
gitlab_rails[
'smtp_port'
]=25
gitlab_rails[
'smtp_user_name'
]=
"gitlab2015@163.com"
gitlab_rails[
'smtp_password'
]=
"nxgfvizafijytymx"
gitlab_rails[
'smtp_domain'
]=
"163.com"
gitlab_rails[
'smtp_authentication'
]=
"login"
gitlab_rails[
'smtp_enable_starttls_auto'
]=
true
gitlab_rails[
'smtp_tls'
]=
false
gitlab_ci[
'smtp_enable'
]=
true
gitlab_ci[
'smtp_address'
]=
"smtp.163.com"
gitlab_ci[
'smtp_port'
]=25
gitlab_ci[
'smtp_user_name'
]=
"gitlab2015@163.com"
gitlab_ci[
'smtp_password'
]=
"nxgfvizafijytymx"
gitlab_ci[
'smtp_domain'
]=
"163.com"
gitlab_ci[
'smtp_authentication'
]=
"login"
gitlab_ci[
'smtp_enable_starttls_auto'
]=
true
4. gitlab command
Reset the configuration to make the modification take effect
gitlab-ctlreconfigure
B. logon Test
Username: root (Administrator account)
Password:5iveL!fe
C. solve the problem that the default gitlab Avatar cannot be displayed normally.
gitlab_rails[
'gravatar_plain_url'
]=
'http://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
gitlab_rails[
'gravatar_ssl_url'
]=
'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
5. Boot script settings
vim
/opt/startGitlab
.sh
==========================
#!/bin/bash
sudo
lokkit-shttp-s
ssh
==========================
echo
"/opt/startGitlab.sh"
>>vim
/etc/rc
.d
/rc
.
local
================================================
6. data backup and recovery
Data backup and recovery commands:
Backup path:
/var/opt/gitlab/backups
(Both backup and recovery files are git Users)
Data backup: gitlab-rakegitlab: backup: create
Data Recovery: gitlab-rakegitlab: backup: restore
Routine Backup Recovery and migration https://segmentfault.com/a/1190000002439923 with Gitlab one-click installation package
Create a backup: gitlab-rakegitlab: backup: create
Restore backup:
# Stop related data connection services
gitlab-ctlstopunicorn
gitlab-ctlstopsidekiq
# Recovering from backup of 1393513186 #
gitlab-rakegitlab:backup:restoreBACKUP=1393513186
# Start Gitlab
sudo
gitlab-ctlstart
7. Reference Links:
http:
//swht1278
.blog.51cto.com
/7138082/1643939