您的位置:首页 > 编程语言 > PHP开发

GitLab设置SMTP邮件服务器

2015-07-08 11:54 537 查看
GitLab 是一款开源的免费软件。

主要功能:Git repository 管理, 代码 reviews, issue 跟踪等。

安装GitLab

1. Install and configure the necessary dependencies

If you install Postfix to send email please select 'Internet Site' during setup. Instead of using Postfix you can also use Sendmail orconfigure
a custom SMTP server. If you wish to use Exim, please
configure it as an SMTP server.

On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.

sudo apt-get install curl openssh-server ca-certificates postfix


使用SMTP邮件服务器,可以不安装postfix

2. Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce


If you are not comfortable installing the repository through a piped script, you can find theentire script here.

3. Configure and start GitLab

sudo gitlab-ctl reconfigure


4. Browse to the hostname and login

Username: root 

Password: 5iveL!fe

GitLab设置

1.设置SMTP邮件服务器,用于GitLab发送邮件

打开/etc/gitlab/gitlab.rb文件,将以下设置添加到文件中,保存。

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = “smtp.exmail.qq.com”
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = “allen@cloudminds.com“
gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_authentication']= “plain"
gitlab_rails['smtp_enable_starttls_auto']= true
gitlab_rails['gitlab_email_from']= 'allen@cloudminds.com'
gitlab_rails['gitlab_email_reply_to']= ‘noreply@cloudminds.com'


2.设置GitLab服务器外部链接

同样,将以下设置田间到/etc/gitlab/gitlab.rb文件中。

<span style="font-size:14px;">external_url “http://192.168.0.13”</span>


GitLab在发送帐户验证邮件时,会包含此Url
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  gitlab