centos6使用yum源安装gitlab-ce私有环境
时间:2016-08-13 16:31 来源:linux.it.net.cn 作者:IT
-
使用清华镜像源配置yum源:
[Gitlab-CE]
name=Gitlab CE
baseurl=https:
//mirror
.tuna.tsinghua.edu.cn
/gitlab-ce/yum/el6/
enabled=1
gpgcheck=0
external_url '
#配置服务器IP地址或域名
#配置e-mail
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
-
重置配置,使修改生效
gitlab-ctl reconfigure
Username: root (管理员账号)
Password: 5iveL!fe
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'
vim
/opt/startGitlab
.sh
==========================
#! /bin/bash
sudo
lokkit -s http -s
ssh
==========================
echo
"/opt/startGitlab.sh"
>> vim
/etc/rc
.d
/rc
.
local
================================================
数据备份及恢复命令:
备份path:
/var/opt/gitlab/backups
(备份和恢复文件都是git用户)
数据备份:gitlab-rake gitlab:backup:create
数据恢复:gitlab-rake gitlab:backup:restore
创建备份:gitlab-rake gitlab:backup:create
恢复备份:
# 停止相关数据连接服务
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
# 从1393513186编号备份中恢复
gitlab-rake gitlab:backup:restore BACKUP=1393513186
# 启动Gitlab
sudo
gitlab-ctl start
http:
//swht1278
.blog.51cto.com
/7138082/1643939
(责任编辑:IT)
(责任编辑:IT) |