Thursday, May 31, 2018

Installing ClamAV Antivirus in AWS EC2 instance


Following steps will help you to setup ClamAV virus scanner in AWS Ec2 instance
Step1 : Install ClamAV
Yum install clamav clamd
Step2 : Setup up log file folder
a.       Create a new folder clamd under /var/log
b.       Provide a read write access to clamscan user
chown -R clamscan:clamscan /var/log/clamd/
Step3: If you are trying to use socket.
            a.       Create a  clamd.scan folder under /var/run
            b.       Provide a read and write access to clamscan user
chown -R clamscan:clamscan /var/run/clamd.scan/
Step4: Setup Configuration
a.       Edit the configuration file available in
vi /etc/clamd.d/scan.conf
b.       To enable logging un comment LogFile and change the path
LogFile /var/log/clamd/clamd.log
c.       If you are using Socket un comment LocalSocket and change the path
                                LocalSocket /var/run/clamd.scan/clamd.sock
d.       If you are tying to TCP port uncomment TCPSocket
Step5:  run sed -i '/^Example$/d' /etc/clamd.d/scan.conf
Step 6  Start service
                service clamd.scan start

No comments:

Post a Comment