制做rpm包工具fpm安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 安装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
1 | yum install rpm - build |
联系方式QQ:326528263 EMAIL:clnking@163.com 网名:bass 分享技术 突破难点 创新思维
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步