安装

sudo gem install --no-ri --no-rdoc fpm

简单使用

一个 redis的简单demo

% ls src/redis-server redis.conf
src/redis-server
redis.conf # install src/redis-server into /usr/bin/
# install redis.conf into /etc/redis/
% fpm -s dir -t deb -n redis --config-files /etc/redis/redis.conf -v 2.6.10 \
src/redis-server=/usr/bin/ \
redis.conf=/etc/redis/
Created deb package {:path=>"redis_2.6.10_amd64.deb"} % dpkg -c redis_2.6.10_amd64.deb
drwx------ jls/jls 0 2013-07-11 23:49 ./
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./etc/
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./etc/redis/
-rw-rw-r-- jls/jls 24475 2013-02-11 04:24 ./etc/redis/redis.conf
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./usr/
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./usr/bin/
-rwxrwxr-x jls/jls 3566152 2013-02-14 11:19 ./usr/bin/redis-server # Did the conffiles setting work? Yep!
% dpkg-deb -e redis_2.6.10_amd64.deb .
% cat conffiles
/etc/redis/redis.conf

系统服务

制作一个通用平台的系统服务

% fpm -s pleaserun -t rpm -n example /usr/bin/example
% rpm -qlp example-1.0-1.x86_64.rpm
/usr/share/pleaserun/example/generate-cleanup.sh
/usr/share/pleaserun/example/install-path.sh
/usr/share/pleaserun/example/install.sh
/usr/share/pleaserun/example/launchd/10.9/files/Library/LaunchDaemons/example.plist
/usr/share/pleaserun/example/launchd/10.9/install_actions.sh
/usr/share/pleaserun/example/systemd/default/files/etc/default/example
/usr/share/pleaserun/example/systemd/default/files/etc/systemd/system/example.service
/usr/share/pleaserun/example/systemd/default/install_actions.sh
/usr/share/pleaserun/example/sysv/lsb-3.1/files/etc/default/example
/usr/share/pleaserun/example/sysv/lsb-3.1/files/etc/init.d/example
/usr/share/pleaserun/example/upstart/0.6.5/files/etc/default/example
/usr/share/pleaserun/example/upstart/0.6.5/files/etc/init/example.conf
/usr/share/pleaserun/example/upstart/1.5/files/etc/default/example
/usr/share/pleaserun/example/upstart/1.5/files/etc/init/example.conf

说明

使用fpm 工具,对于我们软件的分发如虎添翼,很方便,很强大

参考资料

https://fpm.readthedocs.io/en/latest/source/pleaserun.html
https://fpm.readthedocs.io/en/latest/source/dir.html

 
 
 
 

使用fpm 软件包打包的更多相关文章

  1. 基于FPM制作RPM软件包!

    工作中有如下情况需要将文件打包rpm: 避免重复工作,将源码程序打包为rpm 使用yum发布项目,项目打包为rpm 将自己写好的程序打包为rpm,提供给用户下载 其他 以前打包rpm是一个非常复杂的一 ...

  2. 自动化利器-RPM自定义打包

    1.Rpm打包程序 1.1为什么要使用rpm打包 1.编译安装软件,优点是可以定制化安装目录.按需开启功能等,缺点是需要查找并实验出适合的编译参数,诸如MySQL之类的软件编译耗时过长. 2.yum安 ...

  3. fpm 制作rpm包

    使用fpm命令制作rpm包并安装 工作中有如下情况需要将文件打包rpm: 避免重复工作,将源码程序打包为rpm 使用yum发布项目,项目打包为rpm 将自己写好的程序打包为rpm,提供给用户下载 其他 ...

  4. Rpm打包程序

    1.Rpm打包程序1.1为什么要使用rpm打包1.编译安装软件,优点是可以定制化安装目录.按需开启功能等,缺点是需要查找并实验出适合的编译参数,诸如MySQL之类的软件编译耗时过长.2.yum安装软件 ...

  5. 利用fpm定制rpm包

    环境说明 系统版本    CentOS 6.9 x86_64 软件版本    fpm-1.4.0 1.安装ruby环境 fpm利用ruby编程语言开发,先安装ruby的环境 [root@m01 ~]# ...

  6. fpm rpm制作

    使用fpm命令制作rpm包并安装 工作中有如下情况需要将文件打包rpm: 避免重复工作,将源码程序打包为rpm 使用yum发布项目,项目打包为rpm 将自己写好的程序打包为rpm,提供给用户下载 其他 ...

  7. 关于AndroidStudio的打包数字签名以及多渠道发布

    AndroidStudio右侧Gradle里边的build(工程下的)是可以生成未签名的debug和release的apk包生成前可以先clean一下工程 app下的build.gradle里边的 l ...

  8. FPM包定制完成 (等待实现 里程碑 1 和 2) 2018年4月13日 2:18:32

    前期环境准备: 关闭SELINUX  :   setenforce 0 关闭SELINUX  :   sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' / ...

  9. 定制化rpm包及本地yum仓库搭建

    为方便本地yum的管理,一般都是在公司局域网内搭建本地yum仓库,实现公司内部快速安装常用软件. 步骤如下: 1.搭建要实现本地yum管理的软件,测试该软件搭建成功与否: 2.定制rpm包及其相关依赖 ...

随机推荐

  1. _rank

    命令 ._add rank 1000 自定义等级 `level` 等级 `name`等级描述 `prefix` 前缀名称 `gossipText` 菜单显示 `meetValue` 达到值就升级 `r ...

  2. maven eclipse配置 创建项目

    下载maven jar 可以去官网http://maven.apache.org/ 或者我的百度云http://download.csdn.net/detail/taopeng_100/9894787 ...

  3. Roslyn

    Roslyn 是以 API 为驱动的下一代编译器,集成在最新版的 Visual Studio 上.它开放 C# 和 Visual Basic 编译器的 API,使得开发者可以借助编译器进行解析代码文件 ...

  4. 整理this笔记

    1.在浏览器全局环境中this指向的是Window console.log(this); //Window 2.在事件处理函数中的this,这个事件是由谁触发,this就指向谁 3.直接执行一个函数的 ...

  5. caffe提取每一层中的特征,在matlab或python查看

    参考博客: http://blog.csdn.net/abc8730866/article/details/52522843 http://blog.csdn.net/lijiancheng0614/ ...

  6. HDU - 1575——矩阵快速幂问题

    HDU - 1575 题目: A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973.  Input数据的第一行是一个T,表示有T组数据. 每组数据的第一行有n( ...

  7. CentOS安装vmtools后 共享文件不能显示的问题

    摘要:以 下这些方法都是我转自网上的一些比较靠谱的方法,但是大多都是针对ununtu的,特别是针对共享文件挂载的相应处理方法.所以在这里,我主要是这对 centos不能显示共享文件的问题做了重点的介绍 ...

  8. stylus笔记(二)

    1.方法 函数  Stylus强大之处就在于其内置的语言函数定义.其定义与混入(mixins)一致:却可以返回值. 默认参数 可选参数往往有个默认的给定表达.在Stylus中,我们甚至可以超越默认参数 ...

  9. 原生JS获取DOM 节点到浏览器顶部的距离或者左侧的距离

    关于js获取dom 节点到浏览器顶/左部的距离,Jquery里面有封装好的offset().top/offset().left,只到父级的顶/左部距离position().top/position() ...

  10. vue-router中query和params传参(接收参数)以及$router、$route的区别

    query传参: this.$router.push({ path:'/...' query:{ id:id } }) 接收参数:this.$route.query.id params传值: 传参: ...