Install Go agent with Red Hat Package Manager (RPM)
To install the Go agent:
Download both of the executable files from
https://pkg.contrastsecurity.com
. Use this script in your shell to configure your RPM-based system for our package repository. You may needsudo
permissions.tee /etc/yum.repos.d/contrast.repo <<-"EOF" [contrast] name=Contrast centos-$releasever repo baseurl=https://pkg.contrastsecurity.com/rpm-public/centos-$releasever/ gpgcheck=0 enabled=1 EOF
Once complete, use this command to install the agent and service:
sudo yum install contrast-go contrast-service
Be sure the application has a
go.mod
file to indicate required dependencies. In the application source directory run the following command:go mod init
Build your application:
contrast-go build -o output-name-of-application
Configure the Go agent using the Go YAML template or environment variables.
Install and run the Contrast service through the command:
./contrast-service
.Run your application using the executable with the output from above.
Exercise and test your application.
Verify that Contrast sees your application.