LoginSignup
1
2

More than 5 years have passed since last update.

CentOSにclamdを入れてスキャンをしました

Posted at

clamavをいれるとスキャンができるらしいので試してみました。環境はCentOSです。

インストール

install
yum -y install clamd

起動

起動しようとしたらerrorがでました。

start
sudo /etc/init.d/clamd restart
Starting Clam AntiVirus Daemon: ERROR: Can't open /var/log/clamav/clamd.log in append mode (check permissions!).
ERROR: Can't initialize the internal logger
                                                           [FAILED]

どうやらclamd.confのUserが書いてあるとsudoで起動できないみたいです。

clamd.confを編集
sudo vi /etc/clamd.conf
#User clam

User clamの行にコメントをつけました。

start
sudo /etc/init.d/clamd start

起動しました。

スキャン開始

sudo clamscan --infected --remove --recursive
LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
----------- SCAN SUMMARY -----------
Known viruses: 3418320
Engine version: 0.98.4
Scanned directories: 300
Scanned files: 2895
Infected files: 0
Data scanned: 110.00 MB
Data read: 309.69 MB (ratio 0.36:1)
Time: 23.357 sec (0 m 23 s) 

スキャンできました(☝ ՞ਊ ՞)

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2