![]() We can run freshclam any time we want to make sure the definition databases are up to date, but it would be inconvenient to have to always run it manually. We need to run Freshclam to update the database manually and to check whether the configuration is successfully set: # freshclamĬlamAV update process started at Tue Nov 6 15:51:59 2018 ![]() Each directive is commented with an explanation and what the default behavior is. The defaults settings are fine for our purposes and this is more of an annoyance than anything else, but it does force us to look at the file and see what behavior can be tweaked. The file contains a line with the word Example to prevent users from using the defaults blindly and we must remove it or comment it out before we can use freshclam. Therefore, we need to create a backup file from its configuration file: # cp /etc/nf /etc/įreshclam reads its configuration from /etc/nf. To keep the ClamAV database up to date, we need to enable a tool called Freshclam. We add those two lines at the end of the file and save: User root We uncomment the following line: LocalSocket /var/run/clamd.scan/clamd.sock The value given with LocalSocket is the socket file used by the scanner daemon for communicating with outside processes. To configure ClamAV first of all we need to remove the example configuration, so we can make our own configuration: # sed -i '/^Example/d' /etc/clamd.d/nfĪfter removing the example lines, we need to do some modifications to define the TCP server type and to define the user root to execute the antivirus: # vim /etc/clamd.d/nf That’s it, ClamAV with SELinux is ready for use. You should have obtained the following result: antivirus_can_scan_system – & gt front Run this delegation to confirm the changes: getsebool -a | grep antivirus To do that, all you need to do is run the following commands: setsebool -P antivirus_can_scan_system 1 If you want to use ClamAV with SELinux kernel module enabled you will need to change the following settings otherwise you will not be able to read some of your ClamAv files. SELinux is a security measure to protect some of the applied changes. Now, we can install ClamAv on CentOS 7 by running the following command yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemdĬongratulations, you’ve successfully installed antivirus software on your server. Then we can install ClamAV with all its useful tools: You can follow clamav official website to get the details of installing ClamAV on other distributions clamscan -helpĪnd, at the end of this article, we recommend users who face several attacks or frequent unknown file transactions, to install ClamAV antivirus on CentOS to prevent from spreading immediately if malware is detected.ĭear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problems in it.To install ClamAV on CentOS / RHEL 7, we need to install the EPEL repository: # yum install epel-release Use the help parameter to get acquainted with other switches and other features of ClamAV antivirus. To remove viruses, use the -remove switch. Use the -i switch if you want to show virus files. To have a full scan of the root branch, enter the following command. For example, we want to scan the / home directory. You can use the -r switch to scan a specific folder. Use the following command to immediately scan the main branches. Some useful commands for ClamAV antivirusġ. Note: the ClamAV antivirus, has a database that needs to be updated from time to time. Before scanning and working with ClamAV antivirus, please update it. After a while, the ClamAV antivirus is installed on your CentOS Linux and is ready to run.Ĥ. After connecting to your terminal, enter the following command to download prerequisites for installation. ClamAV does not come prepackaged in CentOs by default, so you need to add the repository by running yum commands. Note: you need to know how to use Putty to establish the SSH connection.ġ. In the beginning, make sure that you did root access to your CentOS 7 server or VPS. Recommended Article: How to troubleshoot Remote Desktop A Step-by-Step Guide
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |