How To Install byteman on CentOS 7

In this tutorial we learn how to install byteman on CentOS 7. byteman is Java agent-based bytecode injection tool

Introduction

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

What is byteman

Byteman is a tool which simplifies tracing and testing of Java programs. Byteman allows you to insert extra Java code into your application, either as it is loaded during JVM startup or even after it has already started running. The injected code is allowed to access any of your data and call any application methods, including where they are private. You can inject code almost anywhere you want and there is no need to prepare the original source code in advance nor do you have to recompile, repackage or redeploy your application. In fact you can remove injected code and reinstall different code while the application continues to execute.

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

Install byteman on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install byteman

Install byteman 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 byteman using dnf by running the following command:

sudo dnf -y install byteman

How To Uninstall byteman on CentOS 7

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

sudo dnf remove byteman

References

Summary

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