Remote Monitoring & Management Help

Create a .repo file

The .repo file is stored in the /etc/yum.repos.d directory on the target device and there are two ways to add this file either by download or manually creation with the .repo file itself available from the repository for that particular build.

The following section includes references to the CentOS repository.

1. Download the .repo file

Navigate to yum.repos.d and use wget to download the .repo file for the required distribution and architecture:

# cd /etc/yum.repos.d

# wget http://repos.*/rmmagent/distribution/rmmagent.repo

2. Manually create the .repo file

Navigate to the .repo file in the Agent repository for the required distribution and architecture then copy its contents.

To create the repository file on the target device open an editor with the required .repo filename.

The following examples use the default vi text editor. Information on vi (visual editor) is available in the SS64 quick reference guide

# vi /etc/yum.repos.d/rmmagent.repo

Paste in the copied contents of the repository file and save changes.

In vi press Esc to access the command interface then P to paste the data below the cursor. :wq to write the changes and quit. To view the file to ensure the changes were applied enter:

# cat rmmagent.repo

For example : http://repos.systemmonitor.co.uk/rmmagent/CentOS_5/rmmagent.repo

[rmmagent]

name= Advanced Monitoring Agent for Linux (CentOS_5)

type=rpm-md

baseurl=http://repos.systemmonitor.co.uk/rmmagent/CentOS_5/

gpgcheck=1

gpgkey=http://repos.systemmonitor.co.uk/rmmagent/CentOS_5/repodata/repomd.xml.key

enabled=1

In both cases to ensure the file was saved navigate to the yum.repos.d directory and enter ls to list the directory, the cat command may be used to view the file.

# cd /etc/yum.repos.d

# ls

CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Vault.repo  repomd.xml.asc  rmmagent.repo

# cat rmmagent.repo

[rmmagent]

name= Advanced Monitoring Agent for Linux (CentOS_5)

type=rpm-md

…..

To test whether the repository was added enter the yum list command.

# yum list | grep rmmagent

rmmagent.x86_64  0.7.0.centos5-1.1 rmmagent

rmmagent.i386 0.7.0.centos5-1.2 rmmagent

Details of the installed or available rmmagent packages can be displayed with yum info

# yum info rmmagent

Available Packages

Name        : rmmagent

Arch        : x86_64

Version     : 0.7.0.centos5

Release     : 1.1

Size        : 3.2 M

Repo        : rmmagent

Summary     : Advanced Monitoring Agent

License     : EULA

Description : Advanced Monitoring Agent for Linux.

 

Name        : rmmagent

Arch        : i386

Version     : 0.7.0.centos5

Release     : 1.2

Size        : 3.2 M

Repo        : rmmagent

Summary     : Advanced Monitoring Agent

License     : EULA

Description : Advanced Monitoring Agent for Linux.

 

 

After adding the .repo file it may be necessary to import the required GPG key and this can be achieved with the rpm - import command, referencing the repomd.xml.key in the repodata directory of the repository:

# rpm --import http://repos.*/rmmagent/distribution/repodata/repomd.xml.key 

Or if the key was downloaded elsewhere, simply point to its location to install:

# rpm --import /path/to/key

To check whether the key was imported enter the following which lists all keys and their contents.

# rpm -qai "*gpg*" | grep -A 20 rmmagent

Once the repository is setup to deploy the Agent rmmagent.rpm package run the yum install command including the architecture of the device the Agent is to be installed upon (i.e. i386 or x86_64)

# yum install rmmagent.I386
# yum install rmmagent.x86_64

When prompted enter y to confirm the install size is okay.

================================================================================

 Package         Arch          Version                   Repository        Size

================================================================================

Installing:

 rmmagent        x86_64        0.3.centos5-1.29          /rmmagent         22 M

 

Transaction Summary

================================================================================

Install      1 Package(s)         

Update       0 Package(s)         

Remove       0 Package(s)         

 

Total size: 22 M

Is this ok [y/N]:

After installation Register the Agent on the Dashboard

Please note that we are not responsible for the content of external sites.