What is RPMbuild in Linux?
Rpmbuild command help you to build rpm package from source code. Example you have developed an application for Linux now you have two options either install your application from its source code by configuring it:
compiling it with command:
- # make
and install it with below command:
- # make install
or build the rpm package from source code. Installing an application from source code could be tricky and complicated so best and easy option is to build rpm package for installing your application either through rpm or yum command.
- # rpm -ivh package.rpm
- # yum install package.rpm
Red Hat has provided rpm-build package for building rpm package from an application source code it is supporting most of Linux distros which support rpm (Red Hat Package Manager) for installing application.
If you are using Red Hat or CentOS distros you can easily get rpmbuild command through yum command(make sure your server has access of OS base repository)
- # yum install rpm-build
There is very good tutorial on how to build rpm package from an application source code I suggest you to go through it:
7 Steps to Build a RPM Package from Source on CentOS / RedHat