I have ganglia already installed in /opt/ganglia-3.1.7 and I would like to collect the files in an RPM to be installed on other systems. Does anyone have a template .spec file for something simple like this?

  • 3
    also, there's rpm files of ganglia out in the wild. Wouldnt it be easier to use one of those and just distribute the config files ?
    – Sirex
    Jan 25, 2011 at 16:58

3 Answers 3


While not the canonical solution, take a look at fpm as a simple method to create an RPM package from a set of files. It's much simpler than writing your own RPM spec, and as a bonus it also generates Debian packages in case you need to run on a .deb-based distribution as well.


There is a tutorial section on creating RPM .spec files for your first RPM at rpm.org. Your hardest part will be the first time you create a SPEC file. Another example is in the installation of fonts where the distribution mainly involves dropping files into directories, but some real magic has to occur in the %pre and %post sections to register and unregister the fonts. You could follow this example if you needed to restart a system daemon after installing configuration files.

With your specific request, if you don't want to use the pre-built RPMs, at least download an SRPM, install it, extract the .spec file and remove the source package. Then customize the .spec file for your site and repackage the tool. One caveat though - if you do this to software licensed with the GPL (any version), then you have to be sure to distribute any source code or documentation changes. In this case though, Ganglia is distributed under a BSD license which is more lenient.


Can you re-install ganglia again? The you could run the install under checkinstall which will create an rpm for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.