FPM Making RPM Packages

Source: Internet
Author: User


Brief introduction


FPM: Converting a package type to another type from one type


1 Installation Environment


FPM is written by Ruby and the system environment requires rbuy

Yum install-y Ruby Ruby-devel RubyGems Rpm-bu

Ild


2 Installing FPM

Gem Install FPM


3. Common syntax


Common commands:


-A system schema name, if Noarch is '-a all ' or '-a native '

-S: Specify the Source Type


-T: Specify the target type, that is, why you want to make the package


-N: Specifies the name of the package


-V: Specifies the version number of the package


-C: Specifies the relative path of the package


-D: Specify which packages to depend on


-F: The second package time directory if there is a same name as the installation package exists, then overwrite it;


-P: The production of RPM installation package storage path, do not want to be placed in the current directory need to specify;


--description Package Description


--conflicts conflicts with other software


--post-install: The script to run after the package installation is complete; with--offer-install


--pre-install: The script to run before the package installation is complete; with--before-install


--post-uninstall: The script to run after the package uninstallation is complete; with--offer-remove


--pre-uninstall: The script to run before the package uninstallation is complete; with-before-remove


--prefix: Make the RPM package default installation path;


Details: fpm-h


4 supported target type packages:


RPM: Convert to RPM Package

Deb: Convert to Deb Package

Solaris: Convert to Solaris Package

Puppet: Convert to Puppet Package


5 Example

[[email protected] test]# tar -xf  tengine-2.1.2.tar.gz[[email protected]  test]# cd  tengine-2.1.2[[email protected] tengine-2.1.2]# ./configure  --prefix=/tmp/nginx [[email protected] tengine-2.1.2]# make[[email protected]  tengine-2.1.2]# mkdir /root/install/nginx [[email protected] tengine-2.1.2]# make install destdir=/root/install/nginx[[email protected] tengine-2.1.2]# ls / root/install/nginx/tmp[[email protected] test]#  fpm  -s dir -t  rpm -n tengine -v 2.1.2  -p /root/ --description  "build rpm  package  "  -c /root/install/nginx/tmp/   --prefix /opt/app/[[ email protected] ~]# rpm -qpl tengine-2.1.2-1.x86_64.rpm /opt/app/nginx/conf/ Browsers/opt/app/nginx/conf/fastcgi.conf/opt/app/nginx/conf/fastcgi.conf.default/opt/app/nginx/conf/fastcgi_params/opt/app/nginx/conf/ Fastcgi_params.default/opt/app/nginx/conf/koi-utf/opt/app/nginx/conf/koi-win/opt/app/nginx/conf/mime.types ....


6, installation

[Email protected] ~]# RPM-IVH tengine-2.1.2-1.x86_64.rpm Preparing ... #########################   ######## [100%]updating/installing ...  1:tengine-2.1.2-1 ################################# [100%][[email protected] ~]# Ls/opt/app/nginx[[email Protected] ~]# ls/opt/app/nginx/conf HTML include logs modules Sbin


This article is from the "Crazy_sir" blog, make sure to keep this source http://douya.blog.51cto.com/6173221/1878549

FPM Making RPM Packages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.