ubuntu搭建gitlab服务器

效果图

在这里插入图片描述

如何搭建

  • 安装ubuntu
  • 安装gitlab
  • 配置邮箱

配置邮箱

//  /opt/gitlab-8.5.1-0/apps/gitlab/htdocs/config/environments
			      config.action_mailer.smtp_settings = {
			     :addres => "smtp.163.com",
			     :port => "25",
			     :domain => "163.com",
			     :authentication => :login,
			     :user_name => "nianxiongdi1231@163.com",
			     :password => "",
			     #:openssl_verify_mode => 'none',
			     :enable_starttls_auto => true
			  }

			  config.action_mailer.delivery_method = :smtp
			  config.action_mailer.perform_deliveries = true
			  config.action_mailer.raise_delivery_errors = true
// /opt/gitlab-8.5.1-0/apps/gitlab/htdocs/config/gitlab.yml
			    ## Web server settings (note: host is the FQDN, do not include http://)
			    host: 192.1.1.230
			    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

			    # Relative URL support
			    # WARNING: We recommend using an FQDN to host GitLab in a root path instead
			    # of using a relative URL.
			    # Documentation: http://doc.gitlab.com/ce/install/relative_url.html
			    # Uncomment and customize the following line to run in a non-root path
			    #
			    # 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: nianxiongdi1231@163.com
			    email_display_name: GitLab
			    email_reply_to: nianxiongdi1231@163.com

// /opt/gitlab-8.5.1-0/apps/gitlab/htdocs/config/initializers/smtp_settings.rb
			# To enable smtp email delivery for your GitLab instance do the following:
			# 1. Rename this file to smtp_settings.rb
			# 2. Edit settings inside this file
			# 3. Restart GitLab instance
			#
			# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
			#
			# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests

			if Rails.env.production?
			  Rails.application.config.action_mailer.delivery_method = :smtp

			  ActionMailer::Base.smtp_settings = {
			    address: "smtp.163.com",
			    port: 25,
			    user_name: "nianxiongdi1231@163.com",
			    password: "",   
			    domain: "163.com",
			    authentication: :plain,
			    enable_starttls_auto: true,
			    openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options
			  }
			end

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值