Linux : How To create RPM from Source

This is for the CentOS user out there. Sometimes when you try to search for rpm packages, the only thing that you find is the source file. I like to   create rpm file usingfrom source file:

1. save the source file(usually in tar.gz or tar.bz2 format)
2. extract the files-> tar -xvzf filename.tar.gz or tar -xvjf filename.tar.bz2
3. open the folder of the extracted file and find .spec file
4. type-> rpmbuild -bb filename.spec
5. see the error and continue according to the error until you finish creating rpm files
6. type-> rpm -Uvh filename.rpm to install

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.