zoukankan      html  css  js  c++  java
  • 安装指定版本capistrano

    1、ruby安装
    #yum install -y openssl-devel readline-devel zlib-devel git
    #git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
    设置环境变量:
    [root@pre-storm-a1 profile.d]# more rbenv.sh 
    export RBENV_ROOT=/usr/local/rbenv
    export PATH=$RBENV_ROOT/bin:$PATH
    eval "$(rbenv init -)"
    #git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
    # rbenv install 2.2.6
    # rbenv global 2.2.6
    2.安装capistrano(v2.15)
    #gem install capistrano -v 2.15 -V
    3.修改capistrano代码,支持多个不同密码机器部署
    # vim /usr/local/rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/capistrano-2.15.0/lib/capistrano/ssh.rb 
    在81行: begin 后加入
     
            if options[:passwords]
              servers_array = options.roles[:app].servers.collect {|server| server.host}
              index = servers_array.index(host)
              real_password = options[:passwords][index]
              password_value = real_password
              puts "support multi password #{host}"
            end

     
  • 相关阅读:
    Java_多线程入门
    JAVA多线程基础(一)
    多线程1
    1.优化MySQL数据库
    廖胤松
    Mybatais
    Spring Boot入门
    MySQL的安装步骤详解
    MySQL入门
    WEB测试方法
  • 原文地址:https://www.cnblogs.com/aresxin/p/9253955.html
Copyright © 2011-2022 走看看