Follow these steps to download, configure, and install the agent using Apt or Yum.
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
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:
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:
sudo apt update
sudo apt install cmd
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
sudo yum install cmd
4. Start the agent
$ sudo systemctl enable cmd
$ sudo systemctl start cmd
After that, deployment is complete! Your servers will appear in the Cmd web app.