How to Install ClamAV on CentOS 7

Introduction

ClamAV is free and open-source antivirus software, which can be used on multiple platforms. In this tutorial, we will overview ClamAV installation on CentOS 7.

What you’ll need

Before you begin this guide you’ll need the following:

  • SSH root access to the VPS

Step 1 — Installing ClamAV on CentOS 7

As Clam does not come with default CentOS software repos, we will have to add the additional repository by running yum:

Now, it’s time to install Clam on CentOS. Once again, just run the following command:

All is done, you have just installed antivirus software on your server.

Step 2 — Configuring SELinux

SELinux is a security measure aimed at protecting changes to some files. Additional configuration is required if you want to use ClamAV with enabled SELinux kernel module, otherwise Clam will not be able to read some portion of your files. Just execute following commands:

To verify the changes, run:

You should get this result:

That’s it, ClamAV is ready to use along with SELinux.

Step 3 — Configuring ClamAV

Before Clam configuration can be enabled, you need to remove Example string from the configuration file:

Next, you will have to specify the server type. Open configuration file with your favorite text editor, in this example we will use nano. If it’s not already installed, install it using yum:

Open the configuration file:

Scroll to this line:

#LocalSocket /var/run/clamd.scan/clamd.sock

And change it to:

LocalSocket /var/run/clamd.scan/clamd.sock

Save the changes by hitting CTRL + X shortcut (or COMMAND+X if you are on MAC).

Almost done, now remove Example string from ClamAV’s freshclam update engine configuration file:

Run virus definition database update:

You should get similar output:

Lastly, start Clamd service and run in on boot:

Conclusion

You have just taken one of the steps to secure your server by installing ClamAV on CentOS 7. You can now scan your server against malware and viruses

 

source : https://www.hostinger.com/tutorials/how-to-install-clamav-centos7

Posted on: November 6, 2017, by :  | 9 views

Leave a Reply

https://serang.ut.ac.id/css/css/slot88/ https://tinjut.bagkeu.dikdasmen.kemdikbud.go.id/slot-maxwin/ https://dpm.polinema.ac.id/slot-gacor/ https://akademik.ft.unm.ac.id/slot-dana/ https://ppdb.probolinggokab.go.id/slot-5000/ https://bkad.sulselprov.go.id/assets/ https://ojs.balidwipa.ac.id/docs/slot-gacor/ http://korpri.pekalongankab.go.id/api/slot-gacor/ https://elang.umpp.ac.id/foto/farmasi/-/asset/ http://rsud-kelet.jatengprov.go.id/wp-content/-/asset/ https://kusdhianto-fe.staff.ugm.ac.id/slot88/ http://ppdb.probolinggokab.go.id/judi-bola/ https://bapenda.labuhanbatukab.go.id/racikan-sbobet/ http://rsud-kelet.jatengprov.go.id/wp-content/-/data/ https://agenda.riau.go.id/-/judi-bola/ https://balapan.padang.go.id/sbobet88/ http://jdih.wakatobikab.go.id/sbobet88/ http://kph.menlhk.go.id/sbobet88/ https://bkad.sulselprov.go.id/data/ https://dpm.polinema.ac.id/slot-gacor/ https://dinkes.jemberkab.go.id/storage/attachments/