Created
February 22, 2017 10:39
-
-
Save ShaoZeMing/6c65746e181bcfb62e655c2c29e9ba3c to your computer and use it in GitHub Desktop.
Capistrano3.* 自动化部署工具 Ubuntu+ ContOS 安装详细过程
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capistrano3.* 自动化部署工具 Ubuntu+ ContOS 安装详细过程 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Capistrano是一种通过ssh向多个服务器部署web应用的一种框架和工具。具体更详细的介绍,大家可以登录官方网站或其它相关网站进行了解。
软件版本
先决条件
操作系统:linux
Ruby:2.(官方要求Capistrano3. 基于Ruby>2.0即可)
Rubygem:2.*
capistrano:3.7.2(当前最新版本)
安装
Ubuntu 下安装ruby 和 Rubygem
运行一条命令即可:
sudo apt-get update
sudo apt-get install ruby-full rubygems
由于我安装过了,提示我已近安装了当前Ubuntu最稳定的ruby2.3版本,满足ruby>2.0要求
CentOS 下安装ruby
注:由于CentOS yum库下的ruby版本太低(如下图),无法满足Capistrano 3运行要求,为此只能编译安装>2.0的ruby版本。
CentOS 下安装rubygems
安装capistrano
方法1:
执行命令:
gem install capistrano
由于我安装过了,提示我已近安装了capistrano-3.7.2,这也是当前最新版本了。
方法2:
执行命令:
更多安装方法请参考Captrisano官网
查看安装情况
ruby -v
;gem -v
;cap -v
总结
capistrano依赖zlib和openssl,安装ruby前需要将这两个软件包安装好,这样安装过程才会比较顺利。