Last active
March 13, 2024 19:24
-
-
Save hieu-e/ca409baa8e70981afb66b5d0ce91ab2e to your computer and use it in GitHub Desktop.
Installing ClamAV on Amazon Linux 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install packages | |
sudo yum install clamav clamd | |
#update virus definition | |
sudo freshclam | |
vi /etc/freshclam.conf | |
UpdateLogFile /var/log/freshclam.log | |
LogFileMaxSize 20M | |
LogTime yes | |
ogSyslog yes | |
LogVerbose yes | |
LogRotate yes | |
PidFile /var/run/freshclam.pid | |
Checks 6 | |
ConnectTimeout 60 | |
#update configs | |
vi /etc/clamd.d/scan.conf | |
LogFile /var/log/clamd.scan | |
LogFileMaxSize 20M | |
LogTime yes | |
LogSyslog yes | |
LogRotate yes | |
ExtendedDetectionInfo yes | |
PidFile /run/clamd.scan/clamd.pid | |
LocalSocket /run/clamd.scan/clamd.sock | |
OnAccessMaxFileSize 10M | |
OnAccessMaxThreads 10 | |
OnAccessPrevention yes | |
OnAccessExcludeUname clamav | |
OnAccessIncludePath /home | |
OnAccessIncludePath /var | |
vi /etc/clamd.d/scan.conf | |
LogFile /var/log/clamd.scan | |
LogFileMaxSize 20M | |
LogTime yes | |
LogSyslog yes | |
LogRotate yes | |
ExtendedDetectionInfo yes | |
PidFile /run/clamd.scan/clamd.pid | |
LocalSocket /run/clamd.scan/clamd.sock | |
OnAccessMaxFileSize 10M | |
OnAccessMaxThreads 10 | |
OnAccessPrevention yes | |
OnAccessExcludeUname clamav | |
OnAccessIncludePath /home | |
OnAccessIncludePath /var | |
#Add to startup and start | |
#enable update agent | |
sudo systemctl enable clamav-freshclam | |
sudo systemctl start clamav-freshclam | |
#enable scan daemon | |
sudo systemctl enable clamd@scan | |
sudo systemctl start clamd@scan | |
#enable onacess scanning | |
sudo systemctl enable clamav-clamonacc | |
sudo systemctl start clamav-clamonacc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment