Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Last active May 16, 2024 23:38
Show Gist options
  • Save jhowbhz/bfb0980e776d8bb354d5c338cf75d196 to your computer and use it in GitHub Desktop.
Save jhowbhz/bfb0980e776d8bb354d5c338cf75d196 to your computer and use it in GitHub Desktop.
Install clamav ubuntu 22.04
# 1. Adiciona o usuário
groupadd clamav
useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
# 1.1 Instalar o ClamAV
sudo apt update && sudo apt install clamav clamav-daemon -y
# 2. Configurar o ClamAV
sudo nano /etc/clamav/clamd.conf
# Descomentar e configurar LocalSocket ou TCPSocket e TCPAddr
# Exemplo de configuração:
# LocalSocket /var/run/clamav/clamd.sock
# TCPSocket 3310
# TCPAddr 127.0.0.1
# 2.1 Demais arquivos
nano /usr/local/etc/freshclam.conf
nano /usr/local/etc/clamav-milter.conf
# 3. Atualizar as definições de vírus
sudo systemctl stop clamav-freshclam
sudo freshclam
sudo systemctl start clamav-freshclam
sudo systemctl enable clamav-freshclam
# 4. Iniciar o serviço ClamAV
sudo systemctl start clamav-daemon
sudo systemctl enable clamav-daemon
# 5. Verificar o status do serviço
sudo systemctl status clamav-daemon
# 6. Ver logs
journalctl -u clamav-daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment