码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 7 Install Gitlab CE

时间:2017-09-03 11:06:30      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:使用   ror   cti   tls   art   base   gitlab   multiple   ati   

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.

CentOS 7 Install Gitlab CE

标签:使用   ror   cti   tls   art   base   gitlab   multiple   ati   

原文地址:http://www.cnblogs.com/alex-blog/p/7468793.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!