CentOS 7 Install Gitlab CE
https://hostpresto.com/community/tutorials/how-to-install-and-setup-gitlab-on-centos-7/
http://linux.it.net.cn/CentOS/course/2016/0813/24330.html
http://linux.it.net.cn/CentOS/course/2015/0321/14033.html
https://www.nichijou.com/p/6sh26/
https://segmentfault.com/a/1190000002729796
http://www.cnblogs.com/wintersun/p/3930900.html
使用清华镜像源配置yum源:
vim /etc/yum.repos.d/gitlab.repo
[Gitlab-CE]
name=Gitlab CE
baseurl=https:
//mirror
.tuna.tsinghua.edu.cn
/gitlab-ce/yum/el6/
enabled=1
gpgcheck=0
yum安装
yum install gitlab-ce –y
gitlab配置
vim /etc/gitlab/gitlab.rb
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
How to reset your root password
Log into your server with root privileges. Then start a Ruby on Rails console.
Start the console with this command:
gitlab-rails console production
Wait until the console has loaded.
There are multiple ways to find your user. You can search for email or username.
user = User.where(id: 1).first
or
user = User.find_by(email: 'admin@local.host')
Now you can change your password:
user.password = 'secret_pass' user.password_confirmation = 'secret_pass'
It's important that you change both password and password_confirmation to make it work.
Don't forget to save the changes.
user.save!
Exit the console and try to login with your new password.