Follow these steps to download, configure, and install the Cmd Control or Cmd Audit agent using Apt or Yum. Note: You can't install both agents on the same host.

1. Download Cmd's public key

This PGP key is used to sign all Cmd packages. Download it, then continue to the next step. To download it programmatically, you can use the following command.
curl -o cmd.asc https://storage.googleapis.com/cmd-public-assets/cmd.asc

2. Set up config files

Create two required configuration files in /etc/cmd:

Update the permissions on the files you just created, like this:

sudo chmod -R 600 /etc/cmd

3. Install via package manager

Use either Apt or Yum:

Apt

  1. Add the public key file to apt:

    sudo apt-key add cmd.asc

  2. Add Cmd repo to sources:

    sudo sh -c 'echo "deb [arch=amd64] https://apt.sw.cmd.com/deb/stable default all" > /etc/apt/sources.list.d/cmd.list'

  3. Update and install the agent.

    For Cmd Audit:

    sudo apt update

    sudo apt install cmd

    For Cmd Control:
    sudo apt update

    sudo apt install ccf

Yum

  1. Add the public key file to rpm:

    sudo rpm --import cmd.asc

  2. Write repo config:

    sudo sh -c 'cat << EOF > /etc/yum.repos.d/cmd.repo
    [cmd_yum_stable]
    name=Cmd
    enabled=1
    baseurl=https://yum.sw.cmd.com/rpm/stable
    gpgcheck=1
    EOF'

  3. Install the agent.

    For Cmd Audit:

    sudo yum install cmd

    For Cmd Control:
    sudo yum install ccf

4. Start the agent

For example:

$ sudo systemctl enable cmd
$ sudo systemctl start cmd

Or, for the Cmd Control agent:

$ sudo systemctl enable ccf
$ sudo systemctl start ccf

After that, deployment is complete! Your servers will appear in the Cmd web app.

Did this answer your question?