安装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. mysql日期相关的函数

    1.获取当前时间: /** 获得当前日期+时间(date + time)函数:now(), 常用 **/ select now() from dual; /** 获取当前时间戳,current_tim ...

  2. Mybatis-Dao层开发之Mapper接口

    Mapper接口开发方法只需要程序员编写Mapper接口(相当于Dao接口),由Mybatis框架根据接口定义创建接口的动态代理对象,代理对象的方法体同上边Dao接口实现类方法. Mapper接口开发 ...

  3. java.lang.String cannot be cast to scala.runtime.Nothing Scala中的Nothing类型

    经常在写Rdd的时候, 如:  val OWNER_ID=row.getAs("OWNER_ID")  等, 运行是可能会报异常 : java.lang.String cannot ...

  4. 今天才明白VC++.net的含义: VS系列的c++编译器可以支持托管C++(类似于C#,具体请看MS在线文档),当然包括winform界面开发。

    因此我决定用winform做界面,用C++写逻辑.当然尽量不用托管代码写逻辑.

  5. (原)使用1080Ti显卡时安装ubuntu16.04.1及驱动的步骤

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/6811328.html 参考网址: http://www.cnblogs.com/darkknightz ...

  6. [转载]CentOS6 快速搭建轻量级远程桌面 Xfce&nb

    原文地址:CentOS6 快速搭建轻量级远程桌面 Xfce & VNC & Firefox作者:哈囉健一 0.系统信息 CentOS Linux release 6.0 (Final) ...

  7. java 结束程序进程 代码

    结束firefox的进程,一句代码就够了,如下: Runtime.getRuntime().exec("taskkill /F /IM firefox.exe"); 结束qq: R ...

  8. 【转】25.windbg-!gle、g(错误码、g系列)

    !gle !gle 扩展显示当前线程的最后一个错误码.这个太好记了,getlasterror取首字母: <span style=:> !gle LastErrorValue: (Win32 ...

  9. ceph-mon 代码解读

    一.概述: ceph-mon代码必备知识:Paxos算法,参见此处 数据结构分析: monitor代码结构:    

  10. android 安卓APP获取手机设备信息和手机号码的代码示例

    下面我从安卓开发的角度,简单写一下如何获取手机设备信息和手机号码 准备条件:一部安卓手机.手机SIM卡确保插入手机里.eclipse ADT和android-sdk开发环境 第一步:新建一个andro ...