制做rpm包工具fpm安装
安装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安装的更多相关文章
- linux制做RPM包
制作rpm包 1.制作流程 1.1 前期工作 1)创建打包用的目录rpmbuild/{BUILD,SPECS,RPMS, SOURCES,SRPMS} 建议使用普通用户,在用户家目录中创建 2)确定好 ...
- 如何使用yum来下载RPM包而不进行安装
如何使用yum来下载RPM包而不进行安装 2015-03-23 13:15 theo-l译 linux.cn 字号:T | T yum是基于Red Hat的系统(如CentOS.Fedora.RHEl ...
- 在centos使用rpm包的方式安装mysql,以及更改root密码
在centos使用rpm包的方式安装mysql,对于centos官方实际推荐使用yum进行安装,下载安装的方式主要用于内网服务器不能连接外网yum源的情况. 下载包 首先根据centos版本在mysq ...
- 用yum下载rpm包(不安装)到制定目录
用yum下载rpm包(不安装)到制定目录用yum下载rpm包 www.pcjsh.com 1.安装yum-downloadonly # yum install yum-downloadonly -y ...
- 用yum下载rpm包(不安装)到指定目录
用yum下载rpm包(不安装)到制定目录 用yum下载rpm包 1.安装yum-downloadonly # yum install yum-downloadonly -y 2. ...
- centos7上Jenkins通过rpm包方式直接安装及使用war包方式升级
一.通过rpm包方式直接安装jenkins 1.官网下载rpm安装包(前提是安装jdk) wget https://pkg.jenkins.io/redhat-stable/jenkins-2.121 ...
- rpm打包工具---FPM
FPM的安装:fpm是由ruby gem仓库里面安装的所以要先装ruby.yum安装的ruby版本是1.8.7版本,使用gem命令会报错: >= 1.9.3,所以要安装一个比1.9.3版本高的 ...
- CentOS 下 rpm包与 yum 安装与卸载
rpm包的安装: 1.安装一个包 # rpm -ivh 2.升级一个包 # rpm -Uvh 3.移走一个包 # rpm -e 4.安装参数 --force 即使覆盖属于其它包的文件也强迫安 ...
- 制做RPM包
http://nmshuishui.blog.51cto.com/1850554/1583117 [root@NGM ~]# yum install pcre-devel zlib-devel ope ...
随机推荐
- django之创建第8-2个项目-数据库数据提取之过滤操作符相关
"""1)age__gt = 16等价于age > 162)age = 163)age__gte = 16等价于age >= 164)name__contai ...
- 调用布局View的performClick()方法
修改之前的xml片段. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/an ...
- 不能添加重复的Contact到RecipientBox中
不能添加重复的Contact到RecipientBox中 在开始添加的操作时,判断是否已在RecipientBox中,如果已经在返回值为null的TextView. 再根据TextView判断是否nu ...
- Ubuntu 13.04下安装WPS for Linux
[日期:2013-06-03] 有人说Linux下不是有open office 和libre office么?是啊,可是将windows下的doc文档或者ppt放到Libreoffice上打开的时 ...
- [转]NLP Tasks
Natural Language Processing Tasks and Selected References I've been working on several natural langu ...
- ios实例开发精品文章推荐(8.19)
1.iOS源码:选择器类--简单的效果.<ignore_js_op> 下载地址:http://www.apkbus.com/android-109320-1-1.html 2.iOS源码: ...
- 2011最赚钱的行业和公司排行榜(verified 版本)
最赚钱的行业和公司排行榜(verified 版本) [外资证券]:代表性公司:高盛.中金.摩根士丹利等单位第一年收入:50-80万左右(中金第一年基本工资25万,奖金35万,福利10万)五年后收入:3 ...
- php加密总结
1.md5加密,加密之后是32位的字符串 2.sha1加密, 加密之后是40位的字符串 3.crypt加密, 加密之后是13位的字符串 上面是不可逆的 可逆的如下urlencode --> ur ...
- 关于解锁美版Play市场
关于解锁美版Play市场(本帖已经突破了G+的500评论上限,如有问题请转载留言) 我对这个问题思考的很深刻也思考了很久,作为一个深度google脑残粉怎么能用不完整的Play Store呢?那人生岂 ...
- svn搭建本地服务端
使用VisualSVN Server来完成,下载地址:https://www.visualsvn.com/server/download/ 我安装的版本是3.3.1,安装的时候选择了标准版本,另外一个 ...