{"id":55,"date":"2007-12-22T20:06:00","date_gmt":"2007-12-22T11:06:00","guid":{"rendered":"http:\/\/yokensaka.com\/fedora\/?p=55"},"modified":"2007-12-22T20:06:00","modified_gmt":"2007-12-22T11:06:00","slug":"clamav%e8%87%aa%e5%8b%95%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88%e5%a4%b1%e6%95%97","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/fedora\/?p=55","title":{"rendered":"ClamAV\u81ea\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5931\u6557"},"content":{"rendered":"<p><b>\u25a0\u3000Fedora8<\/b><br \/>\nClamAV\u306e\u6700\u65b0\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u3068\u81ea\u52d5\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u30c4\u30fc\u30ebclamav-update\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u305f\u306e\u3067\u3059\u304c\u3001\u6700\u65b0\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u5931\u6557\u3057\u3066\u308b\u3088\u3046\u3067\u3059\u3002clamav-update\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u8a2d\u5b9a\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3088\u3046\u3067\u3059\u304c\u3001\u66ae\u308c\u3067\u5fd9\u3057\u3044\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u30bd\u30fc\u30b9\u304b\u3089\u624b\u52d5\u3067\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u5f8c\u65e5clamav-update\u3092\u898b\u76f4\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<b>\u25a0\u3000\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eclamav\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/b><\/p>\n<pre>\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@server ~]# tar zxvf clamav-0.91.2_self.tar.gz\nclamav-0.91.2\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5\n[root@server ~]# cd clamav-0.91.2\nclamav-0.91.2\u306e\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n[root@server clamav-0.91.2]# make uninstall\nclamav-0.91.2\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3092\u524a\u9664\n[root@server clamav-0.91.2]# cd\n[root@server ~]# rm -f clamav-0.91.2_self.tar.gz\n[root@server ~]# rm -rf clamav-0.91.2\n\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u524a\u9664\n[root@server ~]# rm -rf \/usr\/local\/clamav<\/pre>\n<p><b>\u25a0\u3000\u6700\u65b0\u7248\u306eClamAV\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059<\/b>\u3000<a href=\"http:\/\/www.clamav.net\/download\/sources\/\" target=\"_blank\">\u6700\u65b0\u7248\u306f\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>[root@server ~]# wget http:\/\/freshmeat.net\/redir\/clamav\/29355\/url_tgz\/clamav-0.92.tar.gz\nclamav-0.92\u3092\u5c55\u958b\n[root@server ~]# tar zxvf clamav-0.92.tar.gz\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\n[root@server ~]# rm -f clamav-0.92.tar.gz\nclamav-0.92\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3078\u79fb\u52d5\n[root@server ~]# cd clamav-0.92\nMakefile\u3092\u81ea\u52d5\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u300cconfigure\u300d\u3092\u5b9f\u884c\u3002\n[root@server clamav-0.92]# .\/configure --prefix=\/usr\/local\/clamav\nmake\u3092\u5b9f\u884c\u3057\u3001clamav\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n[root@server clamav-0.92]# make\n[root@server clamav-0.92]# make install<\/pre>\n<p><b>\u25a0\u3000\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u307e\u3059<\/b><\/p>\n<pre>[root@server clamav-0.92]# cd\n[root@server ~]# tar cvf clamav-0.92_self.tar .\/clamav-0.92\n[root@server ~]# gzip clamav-0.92_self.tar<\/pre>\n<p><b>\u25a0\u3000\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u5909\u66f4<\/b><br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6b63\u5e38\u306b\u5b8c\u4e86\u3057\u305f\u3089\u307e\u305a\u3001\u4e8c\u3064\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<br \/>\n\/usr\/local\/clamav\/etc\/freshclam.conf<br \/>\n\/usr\/local\/clamav\/etc\/clamd.conf<br \/>\n\u3092\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304dExample\u3068\u66f8\u304b\u308c\u305f\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3001\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<pre>[root@server ~]# vi \/usr\/local\/clamav\/etc\/freshclam.conf\n# Comment or remove the line below.\nExample\n\u2193\n#Example\n[root@server ~]# vi \/usr\/local\/clamav\/etc\/clamd.conf\n# Comment or remove the line below.\nExample\n\u2193\n#Example<\/pre>\n<p><b>\u25a0\u3000\u300cfreshclam\u300d\u3092\u4f7f\u7528\u3057\u3066VirusDB\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/b><\/p>\n<pre>[root@server ~]# \/usr\/local\/clamav\/bin\/freshclam\nClamAV update process started at Sat Dec 22 12:21:11 2007\nmain.cvd is up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)\nWARNING: getfile: daily-5111.cdiff not found on remote server (IP: 121.116.26.171)\nERROR: getpatch: Can't download daily-5111.cdiff from database.clamav.net\nWARNING: getfile: daily-5111.cdiff not found on remote server (IP: 121.116.26.171)\nERROR: getpatch: Can't download daily-5111.cdiff from database.clamav.net\nWARNING: getfile: daily-5111.cdiff not found on remote server (IP: 219.117.246.122)\nERROR: getpatch: Can't download daily-5111.cdiff from database.clamav.net\nWARNING: Incremental update failed, trying to download daily.cvd\nDownloading daily.cvd [100%]\ndaily.cvd updated (version: 5216, sigs: 10553, f-level: 21, builder: ccordes)\nDatabase updated (180229 signatures) from database.clamav.net (IP: 61.205.61.201)<\/pre>\n<p><b>\u25a0\u3000\u30a6\u30a3\u30eb\u30b9\u30b9\u30ad\u30e3\u30f3\u78ba\u8a8d(\/etc\/passwd\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u307f\u308b)<\/b><\/p>\n<pre>[root@server ~]# \/usr\/local\/clamav\/bin\/clamscan --infected --remove --recursive \/etc\/passwd\n----------- SCAN SUMMARY -----------\nKnown viruses: 180229\nEngine version: 0.92\nScanned directories: 0\nScanned files: 1\nInfected files: 0\nData scanned: 0.00 MB\nTime: 3.234 sec (0 m 3 s)<\/pre>\n<p>version: 0.92\u3067\u30b9\u30ad\u30e3\u30f3\u3055\u308c\u3066\u308b\u3053\u3068\u3092\u78ba\u8a8d<br \/>\n<b>\u25a0\u3000Clam AntiVirus\u306e\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c\u8a2d\u5b9a<\/b><br \/>\n\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<\/p>\n<pre>[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<\/pre>\n<p><b>\u25a0\u3000Clam AntiVirus\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5b9f\u884c\u6a29\u9650\u4ed8\u52a0<\/b><\/p>\n<pre>[root@linux ~]# chmod 700 clamav.sh<\/pre>\n<p><b>\u25a0\u3000cron\u7de8\u96c6<\/b><\/p>\n<pre>[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\u3000\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>\u25a0\u3000Fedora8 ClamAV\u306e\u6700\u65b0\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u3068\u81ea\u52d5\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u30c4\u30fc\u30ebclamav-update\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u305f\u306e\u3067\u3059\u304c\u3001\u6700\u65b0\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u5931\u6557\u3057\u3066\u308b\u3088\u3046\u3067\u3059\u3002c [&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-55","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\/55","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=55"}],"version-history":[{"count":0,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/fedora\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}