Install gitlab7 on rhel6.4 with one click and set email sending

Source: Internet
Author: User
Install gitlab7 on rhel6.4 with one click and set email sending

There is nothing in the world. Gitlab is a good thing, but the installation manual is really bad. Although gitlab 6.xwas installed step by step in comparison to the document, it was not necessary to spend time on this boring configuration during time-out migration. Google has become a treasure in the past, and has no powerful weapon to go over the wall, so it can only find the answer between Baidu and Bing.


Hard work. Finally, find the one-click installation package for this bitnami. Bitnami-gitlab-7.1.1-0-linux-x64-installer.run.

Https://bitnami.com/redirect/to/39039/bitnami-gitlab-7.1.1-0-linux-x64-installer.run

1. Installation Process

Download is still surprisingly slow. The installation process is as follows:


[[email protected] ~]# service mysqld stopStopping mysqld:                                           [  OK  ][[email protected] ~]# ./bitnami-gitlab-7.1.1-0-linux-x64-installer.runThe installer detects that exists a ‘git‘ user in the system. This installer will change the config                        uration for this user. Do you want to continue the installation? [y/N]: yThe 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/N]: y----------------------------------------------------------------------------Welcome to the Bitnami Gitlab Stack Setup Wizard.----------------------------------------------------------------------------Select the components you want to install; clear the components you do not wantto install. Click Next when you are ready to continue.GitLab : Y (Cannot be edited)GitLab CI [Y/n] :YIs the selection above correct? [Y/n]: Y----------------------------------------------------------------------------Installation folderPlease, choose a folder to install Bitnami Gitlab StackSelect a folder [/opt/gitlab-7.1.1-0]:----------------------------------------------------------------------------Create Admin accountBitnami Gitlab Stack admin user creationEmail Address [[email protected]]: [email protected]Login [user]: masterPassword :********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 isadvisable to use a Domain instead of an IP address for compatibility withdifferent browsers.Domain [192.168.82.181]:Do you want to configure mail support? [y/N]: y----------------------------------------------------------------------------Configure SMTP SettingsThis is required so your application can send notifications via email.Default email provider:[1] GMail[2] CustomPlease choose an option [1] : 2----------------------------------------------------------------------------Configure SMTP SettingsThis data is stored in the application configuration files and may be visible toothers. For this reason, it is recommended that you do not use your personalaccount credentials.Username []: [email protected]Password :Re-enter :SMTP Host []: smtp.qq.comSMTP Port []: 25Secure connection[1] None[2] SSL[3] TLSPlease choose an option [3] :3----------------------------------------------------------------------------Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.Do you want to continue? [Y/n]: 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 tohttp://192.168.82.181:80 from your browser.Press [Enter] to continue:
2. Change the configuration to send an email

Important! You cannot send emails. You need to change several configurations:

1)Config/environments/production. Rb

# vi /opt/gitlab-7.1.1-0/apps/gitlab/htdocs/config/environments/production.rb  ........  # 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 => "smtp.qq.com",    :authentication => :plain,    :user_name => "[email protected]",    :password => "********",    :enable_starttls_auto => true  }  ........

2)Config/environments/production. Rb


  # cd /opt/gitlab-7.1.1-0/apps/gitlab/htdocs/config/initializers/  # cp smtp_settings.rb.sample smtp_settings.rb  # vi smtp_settings.rb

The content is as follows:

# To enable smtp email delivery for your GitLab instance do next:# 1. Rename this file 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: "[email protected]",    password: "********",    domain: "qq.com",    authentication: :login,    enable_starttls_auto: true  }end

3)Config/gitlab. yml

Find the following content and change it to your email address:

# # # # # # # # # # # # # # # # # ## GitLab application config file  ## # # # # # # # # # # # # # # # # ### How to use:# 1. copy file as gitlab.yml# 2. Replace gitlab -> host with your domain# 3. Replace gitlab -> email_fromproduction: &base  #  # 1. GitLab app settings  # ==========================  ## GitLab settings  gitlab:    ## Web server settings (note: host is the FQDN, do not include http://)    host: 192.168.82.181    port: 80    https: false    # 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    ## Email settings    # Email address used in the "From" field in mails sent by GitLab    email_from: [email protected]    support_email: [email protected]    # Email server smtp settings are in [a separate file](initializers/smtp_settings.rb.sample).........
3 Start service and access #/opt/gitlab-7.1.1-0/ctlscript. Sh restart

After you create a user, an email is sent.


Do not forget to open the following service in your QQ mailbox:

The above has been strictly tested on rhel6.4.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.