How To Install fop on CentOS 7

In this tutorial we learn how to install fop on CentOS 7. fop is XSL-driven print formatter

Introduction

In this tutorial we learn how to install fop on CentOS 7.

What is fop

FOP is the world’s first print formatter driven by XSL formatting objects. It is a Java application that reads a formatting object tree and then turns it into a PDF document. The formatting object tree, can be in the form of an XML document (output by an XSLT engine like XT or Xalan) or can be passed in memory as a DOM Document or (in the case of XT) SAX events.

We can use yum or dnf to install fop on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install fop.

Install fop on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install fop using yum by running the following command:

sudo yum -y install fop

Install fop on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install fop using dnf by running the following command:

sudo dnf -y install fop

How To Uninstall fop on CentOS 7

To uninstall only the fop package we can use the following command:

sudo dnf remove fop

References

Summary

In this tutorial we learn how to install fop on CentOS 7 using yum and dnf.