centos 7 安装 Gitlab

机器要求:
内存最低 2G,2核CPU

安装系统

centos 7 1511 Mini

系统初始化设置

  1. 安装wget
yum install wget
  1. 更改yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 系统设置
# 更新软件
yum update

# 安装
yum install vim gcc net-tools unzip bzip2

# 时间同步
yum install ntp
ntpdate us.pool.ntp.org
  1. 增加清华的Gitlab源

vim /etc/yum.repos.d/gitlab-ce.repo
添加以下内容:

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
  1. 安装Gitlab-ce
yum install gitlab-ce
  1. 设置Gitlab的smtp

用来发送通知邮件

vim /etc/gitlab/gitlab.rb

# Change the external_url to the address your users will type in their browser
external_url 'http://xxhost.com'

#Sending application email via SMTP
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 25 
gitlab_rails['smtp_user_name'] = "xxuser@163.com"
gitlab_rails['smtp_password'] = "xxpassword"
gitlab_rails['smtp_domain'] = "163.com"
gitlab_rails['smtp_authentication'] = :login
gitlab_rails['smtp_enable_starttls_auto'] = true

##修改gitlab配置的发信人
gitlab_rails['gitlab_email_from'] = "xxuser@163.com"
user["git_user_email"] = "xxuser@163.com"
  1. 启动
gitlab-ctl reconfigure
posted on 2016-06-02 22:54 bvac 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/bvac/p/5554698.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值