{"id":166,"date":"2024-10-30T18:25:17","date_gmt":"2024-10-30T10:25:17","guid":{"rendered":"https:\/\/zhoujibin.com\/?p=166"},"modified":"2024-10-30T18:25:18","modified_gmt":"2024-10-30T10:25:18","slug":"clamav%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/zhoujibin.com\/?p=166","title":{"rendered":"Clamav\u5b89\u88c5"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u8f6f\u4ef6\u4e0b\u8f7d<\/h1>\n\n\n\n<p><a href=\"https:\/\/www.clamav.net\/downloads\">ClamAV\u5b98\u7f51\u5730\u5740<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u8f6f\u4ef6\u5b89\u88c5<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u79bb\u7ebf\u5b89\u88c5<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5982\uff1a\u6587\u4ef6clamav-1.0.4.linux.x86_64.deb\u4e0a\u4f20\u81f3\/home\/software\u76ee\u5f55\ncd \/home\/software\n# ubuntu\u7cfb\u7edf\u4e0b\u53ef\u4f7f\u7528dpk -i \u547d\u4ee4\u5b89\u88c5\ndpkg -i clamav-1.0.4.linux.x86_64.deb\n# \u5b89\u88c5\u540e\u7684\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\n\/usr\/local\/etc\/<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728\u7ebf\u5b89\u88c5<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install clamav*\n# \u82e5\u5b89\u88c5\u5931\u8d25\uff0c\u6267\u884c\u4e0b\u8ff0\u547d\u4ee4\u540e\u91cd\u8bd5\napt-get update<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u521b\u5efa\u76f8\u5173\u7528\u6237\u3001\u76ee\u5f55\u53ca\u6587\u4ef6<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code># \u521b\u5efa\u7528\u6237 \ngroupadd clamav\nuseradd -g clamav clamav\n# \u521b\u5efa\u65e5\u5fd7\u76ee\u5f55\u548c\u75c5\u6bd2\u5e93\u76ee\u5f55\nmkdir -p \/usr\/local\/clamav\/logs\nmkdir -p \/usr\/local\/clamav\/updata\n# \u521b\u5efa\u65e5\u5fd7\u6587\u4ef6\ntouch \/usr\/local\/clamav\/logs\/clamd.log\ntouch \/usr\/local\/clamav\/logs\/freshclam.log\n# \u6587\u4ef6\u6388\u6743\nchown -R clamav:clamav \/usr\/local\/clamav<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u66f4\u65b0\u75c5\u6bd2\u5e93<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/etc\/\n# \u75c5\u6bd2\u5e93\u8bbe\u7f6e\ncp freshclam.conf.sample freshclam.conf\nvim freshclam.conf\n#Example\u3000\u3000\/\/\u5220\u9664\u6216\u8fd9\u4e00\u884c\uff0c\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a\n# \u75c5\u6bd2\u5e93\u66f4\u65b0\u65e5\u5fd7\u53ca\u8fd0\u884c\u7684\u8fdb\u7a0bid\u6587\u4ef6\nUpdateLogFile \/usr\/local\/clamav\/logs\/clamdav-updata.log\nPidFile \/usr\/local\/clamav\/updata\/clamdav-updata.pid\n# \u75c5\u6bd2\u5e93\u6587\u4ef6\u76ee\u5f55\nDatabaseDirectory \/usr\/local\/clamav\/updata\n:wq\n\n# \u9996\u6b21\u66f4\u65b0\u75c5\u6bd2\u5e93\u8f83\u6162\uff0c\u53ef\u6dfb\u52a0-d\u53c2\u6570\u540e\u53f0\u8fd0\u884c\nfreshclam -d\n# \u547d\u4ee4\u6267\u884c\u5b8c\u6bd5\u540e\u67e5\u770b\/usr\/local\/clamav\/updata\u76ee\u5f55\u662f\u5426\u751f\u6210\u76f8\u5173\u7684cvd\u6587\u4ef6<\/code><\/pre>\n\n\n\n<p>\u53c2\u8003\u5217\u8868\uff1ahttps:\/\/blog.csdn.net\/mr_wanter\/article\/details\/124679908<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4fee\u6539\u57fa\u7840\u914d\u7f6e<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code># \u57fa\u7840\u914d\u7f6e\ncd \/usr\/local\/etc\/\ncp clamd.conf.sample clamd.conf\nvim clamd.conf\n#Example\u3000\u3000\/\/\u5220\u9664\u6216\u8fd9\u4e00\u884c\uff0c\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a\nLogFile \/usr\/local\/clamav\/logs\/clamd.log\nLogTime yes\nLogClean yes\nLogSyslog yes\n# \u89e3\u51b3\u4f7f\u7528clamd\u547d\u4ee4\u65f6\u51fa\u73b0\u7684\u9519\u8bef\uff1aERROR: Please define server type (local and\/or TCP).\nTCPSocket 3310\n# \u89e3\u51b3\u4f7f\u7528clavmdscan\u547d\u4ee4\u65f6\u51fa\u73b0\u7684\u9519\u8bef\uff1aTotal errors: 1\nTCPAddr localhost\nUser clamav\n# \u6b64\u5904\u914d\u7f6e\u75c5\u6bd2\u5e93\u7684\u76ee\u5f55\nDatabaseDirectory \/usr\/local\/clamav\/updata<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u542f\u52a8\u670d\u52a1<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code># \u542f\u52a8\u670d\u52a1\uff0c\u8017\u65f6\u4f1a\u6709\u70b9\u957f\uff0c\u8bf7\u8010\u5fc3\u7b49\u5019\nclamd\n# \u67e5\u770b\u8fdb\u7a0b\nps -ef | grep clamd<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u626b\u63cf\u75c5\u6bd2<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code># \u9012\u5f52\u626b\u63cf\/home\u76ee\u5f55\u5e76\u8f93\u51fa\u65e5\u5fd7\u81f3scan.log\u6587\u4ef6\nclamscan -r \/home\/clamav -l \/home\/clamav\/scan.log\n# \u626b\u63cf \/home\u76ee\u5f55\u5e76\u5220\u9664\u611f\u67d3\u7684\u6587\u4ef6\nclamscan -r \/home\/clamav --remove\n# \u5168\u76d8\u67e5\u75c5\u6bd2\u5e76\u663e\u793a\u7ed3\u679c\uff1a\nclamscan -ir \/\n# \u90e8\u5206\u53c2\u6570\u8bf4\u660e   \n&gt;    -r \u9012\u5f52\u626b\u63cf\u5b50\u76ee\u5f55\n&gt;    -i \u53ea\u663e\u793a\u53d1\u73b0\u7684\u75c5\u6bd2\u6587\u4ef6\n&gt;\u3000\u3000--move &#91;\u8def\u5f84] \u79fb\u52a8\u75c5\u6bd2\u6587\u4ef6\u81f3..\n&gt;\u3000\u3000--remove &#91;\u8def\u5f84] \u5220\u9664\u75c5\u6bd2\u6587\u4ef6\n&gt;\u3000\u3000--quiet \u53ea\u8f93\u51fa\u9519\u8bef\u6d88\u606f\n&gt;\u3000\u3000--infected\/-i \u53ea\u8f93\u51fa\u611f\u67d3\u6587\u4ef6\n&gt;\u3000\u3000--suppress-ok-results\/-o \u8df3\u8fc7\u626b\u63cfOK\u7684\u6587\u4ef6\n&gt;\u3000\u3000--bell \u626b\u63cf\u5230\u75c5\u6bd2\u6587\u4ef6\u53d1\u51fa\u8b66\u62a5\u58f0\u97f3\n&gt;\u3000\u3000--unzip(unrar) \u89e3\u538b\u538b\u7f29\u6587\u4ef6\u626b\u63cf<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u8f6f\u4ef6\u5378\u8f7d<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code># \u7b80\u5355\u5378\u8f7d\ndpkg -r clamav\n# \u5f7b\u5e95\u5378\u8f7d\uff0c\u5c06\u4f1a\u5220\u9664\u914d\u7f6e\u6587\u4ef6\ndpkg -P clamav<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6f\u4ef6\u4e0b\u8f7d ClamAV\u5b98\u7f51\u5730\u5740 \u8f6f\u4ef6\u5b89\u88c5 \u79bb\u7ebf\u5b89\u88c5 \u5728\u7ebf\u5b89\u88c5 \u521b\u5efa\u76f8\u5173\u7528\u6237\u3001\u76ee\u5f55\u53ca\u6587\u4ef6 \u66f4\u65b0\u75c5\u6bd2\u5e93 \u53c2\u8003\u5217\u8868\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[30,47],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-47"],"_links":{"self":[{"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/posts\/166"}],"collection":[{"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":1,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/zhoujibin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhoujibin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}