{"id":47272,"date":"2026-06-27T22:44:56","date_gmt":"2026-06-27T13:44:56","guid":{"rendered":"https:\/\/raybeam.jp\/docs\/initial-server-setup\/how-to-install-and-configure-clamav-to-scan-your-server-regularly-for-malware\/"},"modified":"2026-06-27T22:45:23","modified_gmt":"2026-06-27T13:45:23","slug":"how-to-install-and-configure-clamav-to-scan-your-server-regularly-for-malware","status":"publish","type":"docs","link":"https:\/\/raybeam.jp\/ja\/docs\/initial-server-setup\/how-to-install-and-configure-clamav-to-scan-your-server-regularly-for-malware\/","title":{"rendered":"ClamAV\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30de\u30eb\u30a6\u30a7\u30a2\u3092\u5b9a\u671f\u7684\u306b\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p class=\"is-style-text-annotation is-style-text-annotation--1 wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Ubuntu Server 20.04\u307e\u305f\u306f24.04\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"motivation\" class=\"wp-block-heading\">\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a6\u30a4\u30eb\u30b9\u3084\u30de\u30eb\u30a6\u30a7\u30a2\u3092\u5b9a\u671f\u7684\u306b\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u76f4\u63a5\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3002<\/p>\n\n\n\n<h2 id=\"alternatives\" class=\"wp-block-heading\">\u4ee3\u66ff\u6848<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.rfxn.com\/projects\/linux-malware-detect\/\">LMD\uff08\u30de\u30eb\u30c7\u30c3\u30c8\uff09<\/a> \u307e\u305f\u306fWordPress\u30d7\u30e9\u30b0\u30a4\u30f3 <a href=\"https:\/\/www.wordfence.com\/\">\u30ef\u30fc\u30c9\u30d5\u30a7\u30f3\u30b9<\/a> \u305d\u3057\u3066 <a href=\"https:\/\/nintechnet.com\/ninjascanner\/\">\u5fcd\u8005\u30b9\u30ad\u30e3\u30ca\u30fc<\/a> \u306f\u826f\u3044\u9078\u629e\u80a2\u3060\u3002<\/p>\n\n\n\n<h2 id=\"install-clamav\" class=\"wp-block-heading\">ClamAV\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ClamAV\u306fWordOps Stack\u306e\u4e00\u90e8\u3067\u3042\u308a\u3001\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff08\u3055\u3089\u306b2\u3064\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wo stack install --clamav\nsudo apt install clamav-daemon clamdscan -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">APT\u3067Ubuntu\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install clamav clamav-daemon clamdscan -y<\/code><\/pre>\n\n\n\n<h2 id=\"add-custom-database-signatures\" class=\"wp-block-heading\">\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7f72\u540d\u306e\u8ffd\u52a0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30de\u30eb\u30a6\u30a7\u30a2\u3068\u30a6\u30a4\u30eb\u30b9\u306e\u691c\u51fa\u6a5f\u80fd\u3092\u5f37\u5316\u3059\u308b\u305f\u3081\u306b\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b0\u30cd\u30c1\u30e3\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 <a href=\"https:\/\/www.rfxn.com\/projects\/linux-malware-detect\/\">RFXN \u306e Linux Malware Detect (LMD)<\/a>\u4e00\u822c\u306b\u30de\u30eb\u30c7\u30c3\u30c8\u3068\u547c\u3070\u308c\u308b\u3002\u4ee5\u4e0b\u306e\u30b3\u30f3\u30d5\u30a3\u30ae\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3092<em> <code class=\"\">\/etc\/clamav\/freshclam.conf<\/code><\/em> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DatabaseCustomURL https:\/\/www.rfxn.com\/downloads\/rfxn.ndb\nDatabaseCustomURL https:\/\/www.rfxn.com\/downloads\/rfxn.hdb\nDatabaseCustomURL https:\/\/www.rfxn.com\/downloads\/rfxn.yara<\/code><\/pre>\n\n\n\n<h2 id=\"perform-a-full-scan-of-your-files\" class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u306e\u5b8c\u5168\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a6\u30a4\u30eb\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u624b\u52d5\u3067\u66f4\u65b0\u3057\u3066\u307f\u3088\u3046\u3002 <em>\u30af\u30e9\u30de\u30d5\u30fb\u30d5\u30ec\u30c3\u30b7\u30e5\u30af\u30e9\u30e0<\/em> \u30b5\u30fc\u30d3\u30b9\u3092\u624b\u52d5\u3067\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b)\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl stop clamav-freshclam.service\nsudo freshclam<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3057\u3066\u3001\u79c1\u305f\u3061\u306e\u30b5\u30a4\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b8c\u5168\u306a\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo clamscan -r \/var\/www<\/code><\/pre>\n\n\n\n<h2 id=\"enable-clamav-as-a-service-and-schedule-a-cron-job\" class=\"wp-block-heading\">ClamAV\u3092\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u6709\u52b9\u306b\u3057\u3001cron\u30b8\u30e7\u30d6\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3059\u308b\u3002<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ClamAV\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f2\u3064\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 <em>\u30af\u30e9\u30e0\u30b9\u30ad\u30e3\u30f3<\/em> \u3042\u308b\u3044\u306f <em>\u30af\u30e9\u30e0\u30c9\u30b9\u30ad\u30e3\u30f3<\/em>\u3053\u308c\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u30fb\u30c7\u30fc\u30e2\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30a6\u30a4\u30eb\u30b9\u30fb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u76f4\u63a5\u4fdd\u5b58\u3059\u308b\u3082\u306e\u3067\u3001\u306f\u308b\u304b\u306b\u512a\u308c\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u767a\u63ee\u3059\u308b\u3002\u5fc5\u8981\u306a\u30c7\u30fc\u30e2\u30f3\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u3057\u3066\u6709\u52b9\u306b\u3057\u3066\u307f\u3088\u3046\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start clamav-freshclam.service\nsudo systemctl enable clamav-freshclam.service\nsudo systemctl start clamav-daemon.service\nsudo systemctl enable clamav-daemon.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u904e\u53bb25\u6642\u9593\u4ee5\u5185\u306b\u65b0\u898f\u307e\u305f\u306f\u5909\u66f4\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u308b\u3002sudo\u306ecrontab\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3002\u3055\u3089\u306b\u3001\u5404\u30b9\u30ad\u30e3\u30f3\u5f8c\u306e\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u6700\u521d\u306b\u96fb\u5b50\u30e1\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MAILTO=\"<span \n                data-original-string='XmDoURjczi2fJJq84Xq43w==a667ZJQpFthJUtrQyxnC+5hxjp0bNI2\/AoAA0yfxD449JQ='\n                class='apbct-email-encoder'\n                title='\u3053\u306e\u30b3\u30f3\u30bf\u30af\u30c8\u306fCleanTalk\u306e\u30a2\u30f3\u30c1\u30b9\u30d1\u30e0\u306b\u3088\u3063\u3066\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30af\u30ea\u30c3\u30af\u3057\u3066\u30c7\u30b3\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c7\u30b3\u30fc\u30c9\u3092\u7d42\u4e86\u3059\u308b\u306b\u306f\u3001\u304a\u4f7f\u3044\u306e\u30d6\u30e9\u30a6\u30b6\u3067JavaScript\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002'>\u30a2\u30eb<span class=\"apbct-blur\">****<\/span>@<span class=\"apbct-blur\">*****<\/span>le.com<\/span>\"\n0 2 * * * find \/var\/www -type f -mmin -1500 -print0 | xargs -0 clamdscan --fdpass --multiscan --infected<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-style-default has-small-font-size has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">\u30ea\u30bd\u30fc\u30b9<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.liquidweb.com\/blog\/linux-malware-detect-ubuntu-20-04\/\">https:\/\/www.liquidweb.com\/blog\/linux-malware-detect-ubuntu-20-04\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/malware.expert\/howto\/extending-clamav-signatures-with-rfxn-database-for-php-malwares\">https:\/\/malware.expert\/howto\/extending-clamav-signatures-with-rfxn-database-for-php-malwares<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/tcpip.wtf\/en\/clamav-scan-only-new-modified-files.htm\">https:\/\/tcpip.wtf\/en\/clamav-scan-only-new-modified-files.htm<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/radeksprta.eu\/posts\/automatic-clamav-scans-with-email-notifications\/\">https:\/\/radeksprta.eu\/posts\/automatic-clamav-scans-with-email-notifications\/<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"featured_media":0,"parent":47233,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"pmpro_default_level":"","nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-47272","docs","type-docs","status-publish","hentry","pmpro-has-access"],"_links":{"self":[{"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs\/47272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/comments?post=47272"}],"version-history":[{"count":1,"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs\/47272\/revisions"}],"predecessor-version":[{"id":47273,"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs\/47272\/revisions\/47273"}],"up":[{"embeddable":true,"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs\/47233"}],"wp:attachment":[{"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/media?parent=47272"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/raybeam.jp\/ja\/wp-json\/wp\/v2\/docs_category?post=47272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}