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
:
cmd.prj
β A text file that contains your project key.config.ini
β A configuration file that includes the two required values.
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
Add the public key file to apt:
sudo apt-key add cmd.asc
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'
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
Add the public key file to rpm:
sudo rpm --import cmd.asc
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'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.