Chinaunix首页 | 论坛 | 博客
  • 博客访问: 262465
  • 博文数量: 65
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 375
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-29 21:49
个人简介

Flowers_World

文章分类

全部博文(65)

文章存档

2017年(7)

2016年(38)

2015年(14)

2014年(6)

我的朋友

分类: LINUX

2014-12-21 19:38:16

[ruby] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #  cp -a /opt/gitlab-7.1.1-0/ctlscript.sh /etc/init.d/ctlscript  
  2. #  vim /etc/init.d/ctlscript  
  3. PATH=/bin:/usr/bin:/sbin:/usr/sbin 添加第二行  
  4. $  sudo update-rc.d ctlscript defaults 95  

bitnami的一键安装包。bitnami-gitlab-7.1.1-0-linux-x64-installer.run。



[java] view plaincopy在CODE上查看代码片派生到我的代码片
  1. # ./bitnami-gitlab-7.1.1-0-linux-x64-installer.run    

The 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]: 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/N]: 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.

GitLab : Y (Cannot be edited)

GitLab CI [Y/n] :Y

Is the selection above correct? [Y/n]: Y

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

Please, choose a folder to install Bitnami Gitlab Stack

Select a folder [/opt/gitlab-7.1.1-0]:

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

Bitnami Gitlab Stack admin user creation

Email Address [user@example.com]: 3501xxxxx@qq.com

Login [user]: master

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.82.181]:

Do you want to configure mail support? [y/N]: y

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

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

Default email provider:

[1] GMail
[2] Custom
Please choose an option [1] : 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 []: 3501xxxxx@qq.com

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

SMTP Port []: 25

Secure connection

[1] None
[2] SSL
[3] TLS
Please 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 to
from your browser.
Press [Enter] to continue:


2 更改配置以发送邮件



[java] view plaincopy在CODE上查看代码片派生到我的代码片
  1. # vi /opt/gitlab-7.1.1-0/apps/gitlab/htdocs/config/environments/production.rb    
  2.   ........    
  3.   # config.action_mailer.delivery_method = :sendmail    
  4.   # Defaults to:    
  5.   # # config.action_mailer.sendmail_settings = {    
  6.   # #   location: '/usr/sbin/sendmail',    
  7.   # #   arguments: '-i -t'    
  8.   # # }    
  9.   config.action_mailer.perform_deliveries = true    
  10.   config.action_mailer.raise_delivery_errors = true    
  11.   config.action_mailer.delivery_method = :smtp    
  12.   config.action_mailer.smtp_settings = {    
  13.     :address => "smtp.qq.com",    
  14.     :port => "25",    
  15.     :domain => "smtp.qq.com",    
  16.     :authentication => :plain,    
  17.     :user_name => "3501xxxxx@qq.com",    
  18.     :password => "********",    
  19.     :enable_starttls_auto => true    
  20.   }    
  21.   ........    



  1. # cd /opt/gitlab-7.1.1-0/apps/gitlab/htdocs/config/initializers/  
  2. # cp smtp_settings.rb.sample smtp_settings.rb  
  3. # vi smtp_settings.rb  
# 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: "3501xxxxx@qq.com",
    password: "********",
    domain: "qq.com",
    authentication: :login,
    enable_starttls_auto: true
  }
end



config/gitlab.yml



[ruby] view plaincopy在CODE上查看代码片派生到我的代码片
  1. # # # # # # # # # # # # # # # # # #  
  2. # GitLab application config file  #  
  3. # # # # # # # # # # # # # # # # # #  
  4. #  
  5. # How to use:  
  6. # 1. copy file as gitlab.yml  
  7. # 2. Replace gitlab -> host with your domain  
  8. # 3. Replace gitlab -> email_from  
  9.   
  10. production: &base  
  11.   #  
  12.   # 1. GitLab app settings  
  13.   # ==========================  
  14.   
  15.   ## GitLab settings  
  16.   gitlab:  
  17.     ## Web server settings (note: host is the FQDN, do not include http://)  
  18.     host: 192.168.82.181  
  19.     port: 80  
  20.     https: false  
  21.   
  22.     # Uncommment this line below if your ssh host is different from HTTP/HTTPS one  
  23.     # (you'd obviously need to replace ssh.host_example.com with your own host).  
  24.     # Otherwise, ssh host will be set to the `host:` value above  
  25.     # ssh_host: ssh.host_example.com  
  26.   
  27.     # WARNING: See config/application.rb under "Relative url support" for the list of  
  28.     # other files that need to be changed for relative url support  
  29.     # relative_url_root: /gitlab  
  30.   
  31.     # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')  
  32.     # user: git  
  33.   
  34.     ## Email settings  
  35.     # Email address used in the "From" field in mails sent by GitLab  
  36.     email_from: 3501xxxxx@qq.com  
  37.     support_email: 3501xxxxx@qq.com  
  38.   
  39.     # Email server smtp settings are in [a separate file](initializers/smtp_settings.rb.sample).  
  40. ........  

apache转发


修改安装目录下的 conf/httpd.conf 文件,将以下两行前的注释字符 # 去掉。

#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so

在这个配置文件最后,加上

ProxyPass /app1

ProxyPassReverse /app1



添加gitlab开机启动


[ruby] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #    cp -a /opt/gitlab-7.1.1-0/ctlscript.sh /etc/init.d/ctlscript  
  2. #  vim /etc/init.d/ctlscript  
  3. PATH=/bin:/usr/bin:/sbin:/usr/sbin 第二行加入  
  4. $    sudo update-rc.d ctlscript defaults 95  
阅读(2440) | 评论(0) | 转发(0) |
0

上一篇:stm32的三种编程下载方式

下一篇:mkdir -p

给主人留下些什么吧!~~