How to make RPM using FPM under Linux system

  

If you want to make RPM package under Linux system, you can use FPM tool to complete it. The FPM tool not only makes RPM package creation easier, but also helps users do some finishing work. Let me introduce the method of making RPM packages using FPM under Linux system.

parameters involved here are:

--pre-install FILE: indicates that the script
before installation to run

--post-install FILE: express installation The script to be run later

--pre-uninstall FILE: indicates the script to be run before uninstalling

--post-uninstall FILE: indicates the script to be run after uninstalling

1, fpm tool installation

# yum -y install ruby ​​rubygems ruby-devel rpm-build

# gem sources -a http://ruby.taobao.org/

# gem sources -r https://rubygems.org/

# gem install fpm

2, package luajit

# mkdir /tmp/luajit

# cd /usr/local/src

# wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz

# tar xvzf LuaJIT-2.0 .4.tar.gz

# cd LuaJIT-2.0.4

# make PREFIX=/usr

# make install PREFIX=/usr DESTDIR=/tmp/luajit

# fpm -s dir -t rpm -n LuaJIT -v 2.0.4 --iteration 1.el7 -C /tmp/luajit/-p /root --description ‘luajit rpm package’ --url ‘http://luajit.org’ Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved