How To Create RPM Packages & Why You Should

Dan H
5 min readDec 30, 2019
Insert nice developer aesthetic here.

I was recently tasked with turning verified and company approved wordpress plugins into RPM packages in order to better control and document the plugins that we use in productions. The only issue was, I had no idea how to do this, sure I know Linux, and I work inside it everyday but to me RPM packages where things I install with YUM, the idea of creating my own… well… it just never occured.

So I set out to learn how to create these packages, along with how to create my own YUM repo in which to store them (Covered in my article ‘How To Create A Local YUM Repository’), and it turns out that its actually not all that hard, once you know what you’re doing.

NOTE: FOR THE PURPOSE OF THIS DEMONSTRATION I WAS A ROOT USER, DO NOT CREATE RPM PACKAGES AS ROOT AS IT CAN CAUSE UNWANTED ISSUES.

Tools Required

The tools required for RPM on a CentOS 7 machine are:

rpm-build rpm-devel rpmlint rpmdevtools tree

You can download these with yum , rpmlint & tree and 100% needed, they just make it abit easier.

Creating An Environment To Build In

--

--

Dan H

I write about my discoveries in DevOps, System Engineering and Management. Currently exploring my passions.