LoginSignup
4
2

More than 5 years have passed since last update.

ClamAV(Clam AntiVirus)の設定方法(CentOS6)

Last updated at Posted at 2015-10-28

1.um-prioritiesのインストール
初期設定では、yumでclamdをダウンロード出来ない為、
RPMforgeリポジトリを使用出来るようにする。

yum -y install yum-priorities
yum -y install yum-plugin-priorities

2.リポジトリ優先度設定

vi /etc/yum.repos.d/CentOS-Base.repo

標準リポリトジの優先度を最優先=1に設定する。

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
●「priority=1」を追加する。

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
●「priority=1」を追加する。

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
●「priority=1」を追加する。

3.RPMforgeリポジトリのインストール

wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
rm -f RPM-GPG-KEY.dag.txt

※wgetが使用できない場合、wgetをインストールする。
 # yum install wget

パッケージの確認
http://pkgs.repoforge.org/rpmforge-release/

確認したパッケージをダウンロードする。
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

ダウンロードしたパッケージをアップデート
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y update rmpforge-release

4.clamAVのインストール

yum -y install clamd

5.ROOT権限で動作するように設定変更
vi /etc/clamd.conf

#User clamav
●コメントアウトする

6.clamdを起動
/etc/rc.d/init.d/clamd start

7.Clamdを自動起動設定
chkconfig clamd on

8.ウィルス定義ファイルの更新機能を有効化
sed -i 's/^Example/#Example/g' /etc/freshclam.conf

9.ウィルス定義ファイルを更新
freshclam

10.ウィルススキャン
clamscan --infected --remove --recursive

4
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
4
2