OSのバージョンを上げたついでにウイルスのフルスキャンをしたくなったので軽くやってみた。常駐はさせない。
brewでインストール。
% brew install clamav
(中略)
If you need to have libiconv first in your PATH run:
echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.zshrc
For compilers to find libiconv you may need to set:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
export CPPFLAGS="-I/usr/local/opt/libiconv/include"
(中略)
To finish installation & run clamav you will need to edit
the example conf files at /usr/local/etc/clamav/
(後略)
設定ファイルのサンプルをコピーする。
% cd /usr/local/etc/clamav
% ls
clamd.conf.sample freshclam.conf.sample
% cp -p clamd.conf.sample clamd.conf
% cp -p freshclam.conf.sample freshclam.conf
設定ファイルから「Example」の一言をコメントアウトする。
% vi freshclam.conf
# Comment or remove the line below.
# Example
% vi clamd.conf
# Comment or remove the line below.
# Example
ウイルスデータベース更新
% freshclam
とりあえずホームディレクトリだけフルスキャン。
% clamscan ~/ --recursive --infected
5時間ほどかかった。
----------- SCAN SUMMARY -----------
Known viruses: 8844122
Engine version: 0.103.0
Scanned directories: 39562
Scanned files: 231193
Infected files: 6
Total errors: 9
Data scanned: 32777.63 MB
Data read: 96317.96 MB (ratio 0.34:1)
Time: 18617.907 sec (310 m 17 s)
Start Date: 2021:01:03 13:20:17
End Date: 2021:01:03 18:30:35
以上
参考サイト
macOS Sierra に ClamAV を導入する - Tak Hの日記
macOS Sierra に ClamAV を導入する ClamAV に関する比較的新し目のドキュメントが少なかったので、ここに作成します。 ClamAV is 何 “ Clam AntiVirus (クラム・アンチウイルス。略称Clam AV)とは、オープンソース (GPL) で提供されているクロスプラットフォームの...