{"id":54,"date":"2014-02-11T22:58:12","date_gmt":"2014-02-11T22:58:12","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=18"},"modified":"2014-02-11T22:58:12","modified_gmt":"2014-02-11T22:58:12","slug":"clamav-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/02\/11\/clamav-on-centos-6\/","title":{"rendered":"ClamAV on CentOS"},"content":{"rendered":"<p>ClamAV is a free anti-virus program available for Linux operating systems.This will explain how to Install ClamAV on CentOS 6 64.<\/p>\n<p>Install the epel repository<\/p>\n<p>First, determine the most current version of the repository that is available. Using a web browser, visit <a title=\"Epel Repo\" href=\"http:\/\/download.fedoraproject.org\/pub\/epel\/6\/x86_64\/http:\/\/\" target=\"_blank\" rel=\"noopener\">http:\/\/download.fedoraproject.org\/pub\/epel\/6\/x86_64\/<\/a><\/p>\n<p>Note you can substitute the CentOS version ( \/6\/ ) with your current version.<\/p>\n<p>Scroll down the page until you find epel-release-v-r.noarch-rpm, substituting v for your CentOS version and r will be the current repository version. For this example, the current version listed is epel-release-6-8.noarch-rpm .<\/p>\n<p>Log into your server as root and run the following command using the correct repository version you discovered in the previous step<\/p>\n<p><strong>CentOS 6.x<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrpm -Uvh http:\/\/download.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\n<\/pre>\n<p><strong>CentOS 5.x<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrpm -Uvh http:\/\/mirror.pnl.gov\/epel\/5\/x86_64\/epel-release-5-4.noarch.rpm\n<\/pre>\n<p>Enable Epel Repo &#8211; Set enabled=1:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nnano \/etc\/yum.d\/epel.repo\n&#x5B;epel]\nname=Extra Packages for Enterprise Linux 6 - $basearch\n#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/6\/$basearch\nmirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-6&amp;arch=$basearch\nfailovermethod=priority\nenabled=0\ngpgcheck=0\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\n<\/pre>\n<p>Install clamav<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# yum -y install clamav clamd\n<\/pre>\n<p>Set clamav to start on reboot<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# chkconfig clamd on\n<\/pre>\n<p>Update the clamav virus database<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \/usr\/bin\/freshclam\n<\/pre>\n<p>Error:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \/usr\/bin\/freshclam\nERROR: Please edit the example config file \/etc\/freshclam.conf\nERROR: Can&#039;t open\/parse the config file \/etc\/freshclam.conf\n\n<\/pre>\n<p>Comment out the Line with &#8220;Example&#8221;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# nano \/etc\/freshclam.conf\n##\n## Example config file for freshclam\n## Please read the freshclam.conf(5) manual before editing this file.\n##\n# Comment or remove the line below.\nExample\n\n<\/pre>\n<p>Change to<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# nano \/etc\/freshclam.conf\n##\n## Example config file for freshclam\n## Please read the freshclam.conf(5) manual before editing this file.\n##\n# Comment or remove the line below.\n# Example\n<\/pre>\n<p>Run freshclam again<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \/usr\/bin\/freshclam\n<\/pre>\n<p>Start Clamav<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# service clamd start\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# service clamd start\nStarting Clam AntiVirus Daemon: ERROR: Please edit the example config file \/etc\/clamd.conf\nERROR: Can&#039;t open\/parse the config file \/etc\/clamd.conf\n &#x5B;FAILED]\n\n<\/pre>\n<p>Edit the config file, comment out &#8220;Example&#8221;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n##\n## Example config file for the Clam AV daemon\n## Please read the clamd.conf(5) manual before editing this file.\n##\n# Comment or remove the line below.\n#Example\n\n<\/pre>\n<p>Set Clamav to run a daily scan<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# nano \/etc\/cron.daily\/clamscan\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\n# setup the scan location and scan log\nCLAM_SCAN_DIR=&quot;\/var\/www\/vhosts&quot;\nCLAM_LOG_FILE=&quot;\/var\/log\/clamav\/dailyscan.log&quot;\n# update the virus database\n\/usr\/bin\/freshclam\n# run the scan\n\/usr\/bin\/clamscan -i -r $CLAM_SCAN_DIR &gt;&gt; $CLAM_LOG_FILE\nMAILTO=user@domain.com\n<\/pre>\n<p>or<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nclamscan -i -r --log=\/var\/log\/clamscan-date.txt \/var\/www\/vhosts\/*\n<\/pre>\n<p>Set the cron file as an executible<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">chmod 555 \/etc\/cron.daily\/clamscan<\/pre>\n<p>Test your installation and cron job<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\/etc\/cron.daily\/clamscan<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ClamAV is a free anti-virus program available for Linux operating systems.This will explain how to Install ClamAV on CentOS 6 64. Install the epel repository First, determine the most current version of the repository that is available. Using a web browser, visit http:\/\/download.fedoraproject.org\/pub\/epel\/6\/x86_64\/ Note you can substitute the CentOS version ( \/6\/ ) with your &#8230; <a title=\"ClamAV on CentOS\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/02\/11\/clamav-on-centos-6\/\" aria-label=\"Read more about ClamAV on CentOS\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[119],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-virusmal"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}