Centos6.5 install the fpm packaging tool and centos6.5fpm package

Source: Internet
Author: User

Centos6.5 install the fpm packaging tool and centos6.5fpm package

The FPM function simply converts one type of package to another type.
FPM 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 of software packages
Rpm: Convert rpm
Gem: converts the rubygem package.
Python: Package Python modules into corresponding types

2. Install the ruby environment and the gem command: I will pack the development in advance.
Fpm is written in ruby, so the system environment requires ruby and the version must be later than 1.8.5.

Yum-y install ruby rubygems ruby-devel [root @ 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:

[Root @ game test ~] # *** Current sources *** http://rubygems.org/{ source :[root@game test ~] # Gem sources-a http://mirrors.aliyun.com/rubygems/remove foreign source :[root@game test ~] # Gem sources -- remove http://rubygems.org/

  

4. Install the FPM tool:

[Root @ game test ~] # Gem install fpm errors [root @ game test ~] # Gem install fpmBuilding native extensions. this cocould take a while... building native extensions. this cocould take a while... ERROR: Error installing fpm: ruby-xz requires Ruby version> = 1.9.3.

  

Solution

1. I tried to update ruby. This is because ruby update is a big pitfall. Therefore, this method is not recommended. 2. Install the fpm of the old version [root @ 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... [root @ game test ~] # Gem-v1.3.7

  

5. Common FPM parameters:

-S: Specifies the source type-t: Specifies the target type, that is, why package-n: Specifies the package name-v: Specifies the package version-C: specify the relative package path-d: Specify which packages depend on-f: if an installation package with the same name exists in the directory of the second package, overwrite it-p: directory of the output installation package, if you do not want to put it in the current directory, You need to specify -- post-install: the script to run after the software package is installed; the same as -- offer-install -- pre-install: the script to run before the software package is installed. The same is -- before-install -- post-uninstall: the script to run after the software package is uninstalled; the same is -- offer-remove -- pre-uninstall: the script to run before the package is uninstalled.

  

 

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.