bvac

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

机器要求:
内存最低 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  阅读(225)  评论(0编辑  收藏  举报