一键安装GitLab7在RHEL6.4上(2)

......
  # config.action_mailer.delivery_method = :sendmail
  # Defaults to:
  # # config.action_mailer.sendmail_settings = {
  # #  location: '/usr/sbin/sendmail',
  # #  arguments: '-i -t'
  # # }
  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.qq.com",
    :port => "25",
    :domain => "qq.com",
    :authentication => :plain,
    :user_name => "cheungmine@qq.com",
    :password => "********",
    :enable_starttls_auto => true
  }

config.eager_load = true
  config.assets.js_compressor = :uglifier

config.allow_concurrency = false
......

4.2 smtp_settings.rb
# cp smtp_settings.rb.sample smtp_settings.rb

# To enable smtp email delivery for your GitLab instance do the following:
# 1. Rename smtp_settings.rb.sample to smtp_settings.rb
# 2. Edit settings inside this file
# 3. Restart GitLab instance
#
if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
    address: "smtp.qq.com",
    port: 25,
    user_name: "cheungmine@qq.com",
    password: "********",
    domain: "qq.com",
    authentication: :login,
    enable_starttls_auto: true,
    openssl_verify_mode: 'none'
  }
end

4.3 gitlab.yml

# # # # # # # # # # # # # # # # # #
# GitLab application config file  #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. Copy file as gitlab.yml
# 2. Update gitlab -> host with your fully qualified domain name
# 3. Update gitlab -> email_from
# 4. If you installed Git from source, change git -> bin_path to /usr/local/bin/git
# 5. Review this configuration file for other settings you may want to adjust

production: &base
  #
  # 1. GitLab app settings
  # ==========================

## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include )
    host: pepstack.com
    port: 80                # Set to 443 if using HTTPS, see installation.md#using-https for additional HTTPS configuration details
    https: false            # Set to true if using HTTPS, see installation.md#using-https for additional HTTPS configuration details

# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
    # (you'd obviously need to replace ssh.host_example.com with your own host).
    # Otherwise, ssh host will be set to the `host:` value above
    # ssh_host: ssh.host_example.com

# WARNING: See config/application.rb under "Relative url support" for the list of
    # other files that need to be changed for relative url support
    relative_url_root: /gitlab

# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
    # user: git

## Date & Time settings
    # Uncomment and customize if you want to change the default time zone of GitLab application.
    # To see all available zones, run `bundle exec rake time:zones:all RAILS_ENV=production`
    # time_zone: 'UTC'

## Email settings
    # Uncomment and set to false if you need to disable email sending from GitLab (default: true)
    # email_enabled: true
    # Email address used in the "From" field in mails sent by GitLab
    email_from: cheungmine@qq.com
    support_email: cheungmine@qq.com

# Email server smtp settings are in config/initializers/smtp_settings.rb.sample

# default_can_create_group: false  # default: true
    # username_changing_enabled: false # default: true - User can change her username/namespace
    ## Default theme
    ##  BASIC  = 1
    ##  MARS  = 2
    ##  MODERN = 3
    ##  GRAY  = 4
    ##  COLOR  = 5
    # default_theme: 2 # default: 2
......

上面文件改动之处在于:

host: pepstack.com
relative_url_root: /gitlab
email_from: cheungmine@qq.com
support_email: cheungmine@qq.com

下面的配置是因为要把gitlab置于nginx后面使用:

4.4 httpd-app.conf

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/15807.html