Installing the FPM Packaging tool under CentOS 6.5

Source: Internet
Author: User

The FPM function is simply to convert one type of package into another type.

FPM's GITHUB:HTTPS://GITHUB.COM/JORDANSISSEL/FPM

1. Supported source-type packages:

Dir: Package the directory into the required type, which can be used for source code compilation and installation

RPM: Converting to rpm

Gem: Converting a Rubygem package

Python: Package Python modules into the appropriate type


2. Install the ruby environment and the Gem command: I'll pack the development in advance.

FPM is written by Ruby, so the system environment requires Ruby and the version must be greater than 1.8.5

Yum-y Install ruby RubyGems ruby-devel

[[email protected] Game Test ~]# Rpm-qa | grep rubyruby-1.8.7.374-4.el6_6.x86_64ruby-rdoc-1.8.7.374-4.el6_6.x86_64ruby-devel-1.8.7.374-4.el6_6.x86_ 64ruby-libs-1.8.7.374-4.el6_6.x86_64ruby-irb-1.8.7.374-4.el6_6.x86_64rubygems-1.3.7-5.el6.noarch

3. View the current Ruby Source:

[[email protected] Game Test ~]#*** current SOURCES ***http://rubygems.org/

Add domestic sources:

[[email protected] Game Test ~]# gem sources-a http://mirrors.aliyun.com/rubygems/


To remove a foreign source:

[[email protected] game Test ~] #gem sources--remove http://rubygems.org/


4. Install the FPM tool:

[[email protected] game Test ~] #gem Install FPM


The error encountered

[[email protected] game Test ~] #gem install fpmbuilding native extensions. This could take a while ...  Building native extensions. This could take a while ... Error:error installing FPM:RUBY-XZ requires Ruby version >= 1.9.3.


workaround

1. Update Ruby This method I have tried. Because the hole to update Ruby is larger. So it is not recommended to use this method 2. Install the old version of Fpm[[email protected] game Test ~]# gem install fpm-v 1.4.0Successfully installed clamp-0.6.5successfully Installed fpm-1.4.02 Gems installedinstalling ri documentation for clamp-0.6.5 ... Installing RI documentation for fpm-1.4.0 ... Installing RDOC documentation for clamp-0.6.5 ... Installing RDOC documentation for fpm-1.4.0 ...
[[email protected] Game Test ~]# gem-v1.3.7


5.FPM Common parameters:

-S: Specify the Source Type-T: Specify the target type, that is, the name of the package-N: Specify the packet's first-V: Specifies the package's version number-C: Specifies the packaged relative path-D: Specifies which packages are dependent on-F: The second time the package is in the directory if there is an installation package with the same name, Do not want to be in the current directory, you need to specify--post-install: The script to run after the package installation is complete, and--offer-install--pre-install: The script to run before the package installation is complete The same--before-install--post-uninstall: the script to run after the package uninstallation is complete, and the--offer-remove--pre-uninstall: the script to run before the package is uninstalled; Before-remove




This article from "Do not abandon!" Do not give up "blog, be sure to keep this source http://thedream.blog.51cto.com/6427769/1834192

Installing the FPM Packaging tool under CentOS 6.5

Related Article

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.