Skip to main content

Install Go agent with Red Hat Package Manager (RPM)

To install the Go agent:

  1. Download 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 need sudo 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
  2. Once complete, use this command to install the agent:

    sudo yum install contrast-go
  3. 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
  4. Build your application:

    contrast-go build -o output-name-of-application
  5. Configure the Go agent using the Go YAML template or environment variables.

  6. Run your application using the executable with the output from above.

  7. Exercise and test your application.

  8. Verify that Contrast sees your application.