安装ruby模块
[root@c01 ~]# yum install ruby rubygems ruby-devel -y
# 查看当前使用的rubygems仓库
[root@c01 ~]# gem sources list
*** CURRENT SOURCES *** http://rubygems.org/
添加国内的 淘宝的Rubygems仓库
[root@c01 ~]# gem sources --add http://gems.ruby-china.org
http://gems.ruby-china.org added to sources
[root@c01 ~]# gem sources list
*** CURRENT SOURCES *** http://rubygems.org/
http://gems.ruby-china.org 移除原生的RUBY仓库
[root@c01 ~]# gem sources -r http://rubygems.org/
http://rubygems.org/ removed from sources
[root@c01 ~]# gem sources list
*** CURRENT SOURCES *** http://gems.ruby-china.org
FPM参数说明:
常用参数
-s 指定源类型 (例如dir 目录)
-t 指定目标类型,即想要制作为什么包 (比如想做个rpm包)
-n 指定包的名字 ,-name
-v 指定包的版本号 (用于区分rpm,有同名字但版本不同)
-C 指定打包的相对路径 Change directory to here before searching forfiles
-d 指定依赖于哪些包
-f 第二次打包时目录下如果有同名安装包存在,则强制覆盖它
-p 输出的安装包的目录,不想放在当前目录下就需要指定
--post-install 执行rpm包之后所要运行的脚本;同--after-install
--pre-install 软件包安装完成之前所要运行的脚本;同--before-install
--post-uninstall 软件包卸载完成之后所要运行的脚本;同--after-remove
--pre-uninstall 软件包卸载完成之前所要运行的脚本;同--before-remove 安装fpm及json依赖包, 之前确定经已装了gcc
[root@c01 ~]# gem install json -v 1.8.3
Building native extensions. This could take a while...
Successfully installed json-1.8.3
1 gem installed
Installing ri documentation for json-1.8.3...
Installing RDoc documentation for json-1.8.3...
[root@c01 ~]# gem install fpm -v 1.3.3
Building native extensions. This could take a while...
Successfully installed cabin-0.9.0
Successfully installed backports-3.8.0
Successfully installed arr-pm-0.0.10
Successfully installed clamp-0.6.5
Successfully installed ffi-1.9.18
Successfully installed childprocess-0.7.0
Successfully installed fpm-1.3.3
7 gems installed
Installing ri documentation for cabin-0.9.0...
Installing ri documentation for backports-3.8.0...
Installing ri documentation for arr-pm-0.0.10...
Installing ri documentation for clamp-0.6.5...
Installing ri documentation for ffi-1.9.18...
Installing ri documentation for childprocess-0.7.0...
Installing ri documentation for fpm-1.3.3...
Installing RDoc documentation for cabin-0.9.0...
Installing RDoc documentation for backports-3.8.0...
Installing RDoc documentation for arr-pm-0.0.10...
Installing RDoc documentation for clamp-0.6.5...
Installing RDoc documentation for ffi-1.9.18...
Installing RDoc documentation for childprocess-0.7.0...
Installing RDoc documentation for fpm-1.3.3...
gem从rubygem仓库安装软件类似yum从yum仓库安装软件。首先安装低版本的json,高版本的json需要ruby2.0以上,然后安装低版本的fpm,够用就行。

由于没安装rpm-build

yum install rpm-build

制做rpm包工具fpm安装的更多相关文章

  1. linux制做RPM包

    制作rpm包 1.制作流程 1.1 前期工作 1)创建打包用的目录rpmbuild/{BUILD,SPECS,RPMS, SOURCES,SRPMS} 建议使用普通用户,在用户家目录中创建 2)确定好 ...

  2. 如何使用yum来下载RPM包而不进行安装

    如何使用yum来下载RPM包而不进行安装 2015-03-23 13:15 theo-l译 linux.cn 字号:T | T yum是基于Red Hat的系统(如CentOS.Fedora.RHEl ...

  3. 在centos使用rpm包的方式安装mysql,以及更改root密码

    在centos使用rpm包的方式安装mysql,对于centos官方实际推荐使用yum进行安装,下载安装的方式主要用于内网服务器不能连接外网yum源的情况. 下载包 首先根据centos版本在mysq ...

  4. 用yum下载rpm包(不安装)到制定目录

    用yum下载rpm包(不安装)到制定目录用yum下载rpm包 www.pcjsh.com  1.安装yum-downloadonly # yum install yum-downloadonly -y ...

  5. 用yum下载rpm包(不安装)到指定目录

    用yum下载rpm包(不安装)到制定目录    用yum下载rpm包   1.安装yum-downloadonly   # yum install yum-downloadonly -y     2. ...

  6. centos7上Jenkins通过rpm包方式直接安装及使用war包方式升级

    一.通过rpm包方式直接安装jenkins 1.官网下载rpm安装包(前提是安装jdk) wget https://pkg.jenkins.io/redhat-stable/jenkins-2.121 ...

  7. rpm打包工具---FPM

    FPM的安装:fpm是由ruby gem仓库里面安装的所以要先装ruby.yum安装的ruby版本是1.8.7版本,使用gem命令会报错: >= 1.9.3,所以要安装一个比1.9.3版本高的 ...

  8. CentOS 下 rpm包与 yum 安装与卸载

    rpm包的安装:      1.安装一个包 # rpm -ivh 2.升级一个包 # rpm -Uvh 3.移走一个包 # rpm -e 4.安装参数 --force 即使覆盖属于其它包的文件也强迫安 ...

  9. 制做RPM包

    http://nmshuishui.blog.51cto.com/1850554/1583117 [root@NGM ~]# yum install pcre-devel zlib-devel ope ...

随机推荐

  1. django之创建第10-1个项目-图片上传并记录上传时间

    1.百度云盘:django之创建第10-1个项目-图片上传并记录上传时间 2.主要修改的配置文件有3个,forms.views和models3个文件以及html 3.forms.py文件修改 #cod ...

  2. 【转】Appium移动自动化测试(三)--安装Android模拟器

    原文出自:http://www.cnblogs.com/fnng/p/4560298.html?utm_source=tuicool 当Android SDK安装完成之后,并不意味着已经装好了安装模拟 ...

  3. 【Dubbo实战】 Dubbo+Zookeeper+Spring整合应用篇-Dubbo基于Zookeeper实现分布式服务(转)

    Dubbo与Zookeeper.Spring整合使用 Dubbo采用全Spring配置方式,透明化接入应用,对应用没有任何API侵入,只需用Spring加载Dubbo的配置即可,Dubbo基于Spri ...

  4. 微信小程序解决方案合集

    微信小程序解决方案合集:http://www.wxapp-union.com/special/solution.html 跳坑系列:http://www.wxapp-union.com/forum.p ...

  5. ajax post方式下载后台传来的文件

    参考:http://stackoverflow.com/questions/16086162/handle-file-download-from-ajax-post $.ajax({ type: &q ...

  6. ios中layoutsubview何时被调用

    layoutsubview和viewDidlayoutsubview(控制器)被调用的集中情况 一:当view的frame或bounds发生改变 1:直接改view的frame或bounds 会调用v ...

  7. JavaScript 函数入门略解

    1.JavaScript 函数语法函数就是包裹在花括号中的代码块,前面使用了关键词 function: function functionname() { 这里是要执行的代码 } 当调用该函数时,会执 ...

  8. HDU 1258 Sum It Up (DFS)

    Sum It Up Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total S ...

  9. nginx 安装SSL安全证书

    安装证书 文件说明: 1. 证书文件214051493730988.pem,包含两段内容,请不要删除任何一段内容. 2. 如果是证书系统创建的CSR,还包含:证书私钥文件214051493730988 ...

  10. Tomcat之如何使用Nginx进行集群部署

    目录结构: contents structure [+] 1,为什么需要集群 2,如何使用Nginx部署tomcat集群 2.1,下载Nginx 2.2,在同一台电脑上部署多个Tomcat服务器 2. ...