07098 发表于 2015-12-1 08:49:12

使用bitnami部署gitlab的邮件提醒配置

1.安装过程不再赘述,详见:

# ./bitnami-gitlab-7.12.2-0-linux-x64-installer.run
The installer detects that exists a 'git' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? : y

The installer detects that exists a 'gitlab_ci' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? : y

----------------------------------------------------------------------------
Welcome to the Bitnami Gitlab Stack Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.

PhpPgAdmin :y

GitLab : Y (Cannot be edited)

GitLab CI :y

Is the selection above correct? : y

----------------------------------------------------------------------------
Installation folder

Please, choose a folder to install Bitnami Gitlab Stack

Select a folder : /usr/local/gitlab2

----------------------------------------------------------------------------
Create Admin account

Bitnami Gitlab Stack admin user creation

Email Address [user@example.com]: ****@qq.com

Login : root

Password :
Please confirm your password :
Warning: The length of the password must be equal or greater than 8
Press to continue:
----------------------------------------------------------------------------
Create Admin account

Bitnami Gitlab Stack admin user creation

Email Address [****@qq.com]:

Login :   

Password :
Please confirm your password :
----------------------------------------------------------------------------
Hostname that will be used to create internal URLs. If this value is incorrect,
you may be unable to access your Gitlab installation from other computers. It is
advisable to use a Domain instead of an IP address for compatibility with
different browsers.

Domain : 192.168.49.129

Do you want to configure mail support? : y

----------------------------------------------------------------------------
Configure SMTP Settings

This is required so your application can send notifications via email.

Default email provider:

GMail
Custom
Please choose an option : 2

----------------------------------------------------------------------------
Configure SMTP Settings

This data is stored in the application configuration files and may be visible to
others. For this reason, it is recommended that you do not use your personal
account credentials.

Username []: **@qq.com

Password :
Re-enter :
SMTP Host []: smtp.qq.com

SMTP Port : 25

Secure connection

None
SSL
TLS
Please choose an option : 3

----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.

Do you want to continue? : y

----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Gitlab Stack on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

----------------------------------------------------------------------------

Setup has finished installing Bitnami Gitlab Stack on your computer.

Info: To access the Bitnami Gitlab Stack, go to
http://192.168.49.129:80 from your browser.
Press to continue:

2.还需要配置几个地方: 首先检查/usr/local/gitlab/properties.ini文件是否正确

#cat cat /usr/local/gitlab/properties.ini

smtp_host=smtp.exmail.qq.com
smtp_port=25
smtp_user=server@**.net
smtp_password=*****
smtp_protocol=tls

然后依次配置如下3个文件即可

#cat /usr/local/gitlab/apps/gitlab/htdocs/config/environments/production.rb

config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
    :address => "smtp.exmail.qq.com",
    :port => "25",
    :domain => "smtp.exmail.qq.com",
    :authentication => :plain,
    :user_name => "server@**.net",
    :password => "*****",
    :enable_starttls_auto => true
}

config.eager_load = true

config.allow_concurrency = false
end

#cat /usr/local/gitlab/apps/gitlab/htdocs/config/initializers/smtp_settings.rb

ActionMailer::Base.smtp_settings = {
    address: "smtp.exmail.qq.com",
    port: 25,
    user_name: "server@**.net",
    password: "****",
    domain: "smtp.exmail.qq.com",
    authentication: :login,
    enable_starttls_auto: true
}
end

#cat /usr/local/gitlab/apps/gitlab/htdocs/config/gitlab.yml      //此配置项定义发送邮件时显示的发送地址,某些邮件服务器发送时会检查邮箱的发送地址跟登录账户是否一致,不一致就拒绝发送,建议一致。
    email_from: bq_server@***.net
    email_display_name: bq_server
    email_reply_to: bq_server@***.net
页: [1]
查看完整版本: 使用bitnami部署gitlab的邮件提醒配置