{"id":46,"date":"2007-06-28T20:56:00","date_gmt":"2007-06-28T11:56:00","guid":{"rendered":"http:\/\/yokensaka.com\/fedora\/?p=46"},"modified":"2007-06-28T20:56:00","modified_gmt":"2007-06-28T11:56:00","slug":"clamav%e3%81%ae%e6%9c%80%e6%96%b0%e7%89%88%e3%82%92%e3%82%bd%e3%83%bc%e3%82%b9%e3%81%8b%e3%82%89%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/fedora\/?p=46","title":{"rendered":"ClamAV\u306e\u6700\u65b0\u7248\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p><b>\u203b Fedora7<\/b><br \/>\nyum\u3067\u6700\u65b0\u7248\u306e\u300cversion: 0.90.3\u300d\u306b\u306a\u304b\u306a\u304b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u306a\u3044\u306e\u3067wget\u3067\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u25a0 \u6700\u521d\u306byum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u300cversion: 0.90.2\u300d\u306eclamav\u3068clamav-update\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre>[root@linux ~]# yum -y remove clamav clamav-update<\/pre>\n<p>\u25a0 \u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408\u306f\u3001clamav\u3068\u3044\u3046\u30b0\u30eb\u30fc\u30d7\u304a\u3088\u3073\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>[root@linux ~]# groupadd clamav\n[root@linux ~]# useradd -g clamav -s \/bin\/false clamav\u3000\u2190clamav\u30e6\u30fc\u30b6\u30fc\uff08clamav\u30b0\u30eb\u30fc\u30d7\u3001\u30ed\u30b0\u30a4\u30f3\u4e0d\u53ef\uff09 <\/pre>\n<p><b>\u25a0 ClamAV\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/b><br \/>\nClamAV\u3092<a href=\"http:\/\/www.clamav.net\/download\/sources\/\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre>[root@linux ~]# wget http:\/\/freshmeat.net\/redir\/clamav\/29355\/url_tgz\/clamav-0.90.3.tar.gz\n\u5c55\u958b\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\n[root@linux ~]# tar zxvf clamav-0.90.3.tar.gz\nclamav\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3078\u79fb\u52d5\u3057\u307e\u3059\n[root@linux ~]# cd clamav-0.90.3\n[root@linux clamav-0.90.3]# .\/configure --prefix=\/usr\/local\/clamav\n[root@linux clamav-0.90.3]# make\n[root@linux clamav-0.90.3]# make install<\/pre>\n<p><b>\u25a0 \u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3068\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/b><\/p>\n<pre>\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\n[root@linux clamav-0.90.3]# cd\n[root@linux~]# tar cvf clamav-0.90.3_self.tar .\/clamav-0.90.3\n[root@linux ~]# gzip clamav-0.90.3_self.tar\n\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\n\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u3042\u3063\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5c55\u958b\u3002\n[root@linux ~]# tar zxvf clamav-0.90.3_self.tar.gz\nclamav-0.90.3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5\n[root@linux ~]# cd clamav-0.90.3\nclamav-0.90.3\u306e\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n[root@linux clamav-0.90.3]# make uninstall<\/pre>\n<p><b>\u25a0Clam AntiVirus\u306e\u8a2d\u5b9a<\/b><\/p>\n<pre>[root@linux ~]# vi \/usr\/local\/clamav\/etc\/freshclam.conf\n# Comment or remove the line below.\nExample\n\u2193\n#Example\n[root@linux ~]# vi \/usr\/local\/clamav\/etc\/clamd.conf\n# Comment or remove the line below.\nExample\n\u2193\n#Example<\/pre>\n<p><b>\u25a0\u30a6\u30a3\u30eb\u30b9\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u65b0\u5316<\/b><\/p>\n<pre>[root@linux ~]# \/usr\/local\/clamav\/bin\/freshclam\nClamAV update process started at Thu Jun 28 18:41:35 2007\nmain.cvd is up to date (version: 43, sigs: 104500, f-level: 14, builder: sven)\nDownloading daily-3567.cdiff [100%]\nDownloading daily-3568.cdiff [100%]\nDownloading daily-3569.cdiff [100%]\nDownloading daily-3570.cdiff [100%]\ndaily.inc updated (version: 3570, sigs: 27119, f-level: 16, builder: ccordes)\nDatabase updated (131619 signatures) from database.clamav.net (IP: 203.212.42.128)<\/pre>\n<p>\u6700\u65b0\u7248\u304c\u30a2\u30c3\u30d7\u3055\u308c\u305f\u6642\u306f\u3001freshclam \u3092\u5b9f\u884c\u3059\u308b\u3068\u81ea\u30b5\u30fc\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4f1a\u308f\u306a\u3044\u306e\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8b66\u544a\u304c\u51fa\u307e\u3059\u3002\uff08\u3053\u306e\u5834\u5408\u306f\u81ea\u30b5\u30fc\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 0.90.2 \u306b\u5bfe\u3057\u3066\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 0.90.3\uff09\u3053\u306e\u8b66\u544a\u304c\u51fa\u305f\u3089\u6700\u65b0\u7248\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>WARNING: Your ClamAV installation is OUTDATED!\nWARNING: Local version: 0.90.2 Recommended version: 0.90.3<\/pre>\n<p><b>\u25a0Clam AntiVirus\u306e\u78ba\u8a8d<\/b><\/p>\n<pre>\u30a6\u30a3\u30eb\u30b9\u30b9\u30ad\u30e3\u30f3\u78ba\u8a8d(\/etc\/passwd\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u307f\u308b)\n[root@linux ~]# \/usr\/local\/clamav\/bin\/clamscan --infected --remove --recursive \/etc\/passwd\n----------- SCAN SUMMARY -----------\nKnown viruses: 130699\nEngine version: 0.90.3\nScanned directories: 0\nScanned files: 1\nInfected files: 0\nData scanned: 0.00 MB\nTime: 64.979 sec (1 m 4 s)<\/pre>\n<p><b>\u25a0Clam AntiVirus\u306e\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c\u8a2d\u5b9a<\/b><\/p>\n<pre>\u6bce\u65e5\u81ea\u52d5\u7684\u306b\u30a6\u30a3\u30eb\u30b9\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u6700\u65b0\u5316\u3057\u3066\u3001\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30a6\u30a3\u30eb\u30b9\u30b9\u30ad\u30e3\u30f3\u3092\u884c\u3046\u30b9\u30d7\u30ea\u30af\u30c8\u306e\u4f5c\u6210\n[root@linux ~]# vi clamav.sh\n#!\/bin\/bash\nPATH=\/usr\/bin:\/bin\n# excludelist\nexcludelist=\/root\/clamscan.exclude\nif [ -s $excludelist ]; then\nfor i in `cat $excludelist`\ndo\nif [ $(echo \"$i\"|grep \\\/$) ]; then\ni=`echo $i|sed -e 's\/^\\([^ ]*\\)\\\/$\/\\1\/p' -e d`\nexcludeopt=\"${excludeopt} --exclude-dir=$i\"\nelse\nexcludeopt=\"${excludeopt} --exclude=$i\"\nfi\ndone\nfi\nCLAMSCANTMP=`mktemp`\n\/usr\/local\/clamav\/bin\/freshclam > \/dev\/null\n\/usr\/local\/clamav\/bin\/clamscan --recursive --remove ${excludeopt} \/ > $CLAMSCANTMP 2>&1\n[ ! -z \"$(grep FOUND$ $CLAMSCANTMP)\" ] && \\\ngrep FOUND$ $CLAMSCANTMP | mail -s \"Virus Found in `hostname`\" root\nrm -f $CLAMSCANTMP\nClam AntiVirus\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5b9f\u884c\u6a29\u9650\u4ed8\u52a0\n[root@linux ~]# chmod 700 clamav.sh\ncron\u7de8\u96c6\n[root@linux ~]# crontab -e\n00 03 * * * \/root\/clamav.sh\u3000\u2190\u3000\u8ffd\u52a0(\u6bce\u65e53:00\u306bClam AntiVirus\u306e\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c)<\/pre>\n<p><b>\u25a0\u30b9\u30ad\u30e3\u30f3\u9664\u5916\u8a2d\u5b9a<\/b><br \/>\nbackup\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u5916\u306b\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a<\/p>\n<pre>[root@linux ~]# echo \"\/backup\/\" >> clamscan.exclude<\/pre>\n<div align=right><a href=\"#\">\u25b2 \u30da\u30fc\u30b8\u30c8\u30c3\u30d7\u3078<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u203b Fedora7 yum\u3067\u6700\u65b0\u7248\u306e\u300cversion: 0.90.3\u300d\u306b\u306a\u304b\u306a\u304b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u306a\u3044\u306e\u3067wget\u3067\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 \u25a0 \u6700\u521d\u306byum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u300cversion: 0.90 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-23-clam-av"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":0,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}