# Déploiement de l'agent Nanometrics

## Prérequis

- Debian/Ubuntu amd64
- systemd

## Installation

```bash
# Copier le binaire
sudo cp ../agent/target/release/nanometrics-agent /usr/local/bin/
sudo chmod 755 /usr/local/bin/nanometrics-agent

# Créer la configuration
sudo mkdir -p /etc/nanometrics
sudo cp ../agent/config.toml.example /etc/nanometrics/config.toml
sudo nano /etc/nanometrics/config.toml  # ajuster server.ip

# Installer et démarrer le service
sudo cp nanometrics-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable nanometrics-agent
sudo systemctl start nanometrics-agent
sudo systemctl status nanometrics-agent
```

## Vérification

```bash
sudo journalctl -u nanometrics-agent -f
```

## Désinstallation

```bash
sudo systemctl stop nanometrics-agent
sudo systemctl disable nanometrics-agent
sudo rm /etc/systemd/system/nanometrics-agent.service
sudo rm /usr/local/bin/nanometrics-agent
sudo rm -rf /etc/nanometrics
sudo systemctl daemon-reload
```
