LoginSignup
3
4

More than 5 years have passed since last update.

【検証用メモ】インストールするもの

Last updated at Posted at 2016-10-04

説明

検証用のメモとして使用。
chef-soloもしくはknife-zeroでの各MWインストール手順を検証。
手動でインストールしてから、chef用のコード作成
順番はあとから揃える。

環境

[ec2-user@ip-192-168-0-8~]$ uname -a
Linux ip-192-168-0-8 4.4.11-23.53.amzn1.x86_64 #1 SMP Wed Jun 1 22:22:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

clamav

手動

インストール

[ec2-user@ip-192-168-0-8 ~]$ sudo yum install clamd

シンボリックリンク作成

[ec2-user@ip-192-168-0-8 ~]$ sudo ln -s /etc/clamd.d/scan.conf /etc/clamd.conf

しないと怒られる

[ec2-user@ip-192-168-0-8 ~]$ clamd --version
ERROR: Can't open/parse the config file /etc/clamd.conf

準備①
参考:https://centossrv.com/clamav.shtml

[ec2-user@ip-192-168-0-8 ~]$ sudo vim /etc/clamd.d/scan.conf  
7 # Comment or remove the line below. 
8 # Example  ←コメントアウト(ウィルス定義ファイル更新機能の有効化)

準備②
vim
[ec2-user@ip-192-168-0-8 ~]$ sudo vim /etc/clamd.d/scan.conf
101 TCPSocket 3310  ←コメントアウト外す



109 TCPAddr 127.0.0.1  ←コメントアウト外す

バージョン確認

[ec2-user@ip-192-168-0-8 ~]$ clamd --version
ClamAV 0.99.2/21723/Mon Jun 13 13:53:00 2016

サービス開始

エラー
bash
[ec2-user@ip-192-168-0-8 ~]$ sudo /etc/rc.d/init.d/clamd.scan start
Starting clamd.scan: LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************

ウイルス定義更新

freshclamコマンドが見つからない

[ec2-user@ip-192-168-0-8 ~]$ freshclam
-bash: freshclam: command not found

clamav-updateパッケージが入っていないとだめらしい
参考:
http://www.server-memo.net/server-setting/clamav/epel-clamav-install.html

[ec2-user@ip-192-168-0-8 ~]$ rpm -qa | grep clamav-update
[ec2-user@ip-192-168-0-8 ~]$

無いのでインストール

[ec2-user@ip-192-168-0-8 ~]$ sudo yum install clamav-update

コマンドはできた
bash
[ec2-user@ip-192-168-0-8 ~]$ freshclam
ERROR: Please edit the example config file /etc/freshclam.conf
ERROR: Can't open/parse the config file /etc/freshclam.conf

↓編集
bash
[ec2-user@ip-192-168-0-8 ~]$ sudo vim /etc/freshclam.conf
8 # Example  ←コメントアウト
139 #NotifyClamd /path/to/clamd.conf
140 NotifyClamd /etc/clamd.d/scan.conf ←追記

sudo で出来た
```bash
[ec2-user@ip-192-168-0-8 ~]$ freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-4ff21dfd9e840f07506ef088bce528fc.tmp
Hint: The database directory must be writable for UID 500 or GID 500
[ec2-user@ip-192-168-0-8 ~]$ sudo vim /etc/freshclam.conf
(略)
bytecode.cld updated (version: 283, sigs: 53, f-level: 63, builder: neo)
Database updated (4879174 signatures) from database.clamav.net (IP: 203.178.137.175) ERROR: NotifyClamd: Can't connect to clamd on 127.0.0.1:3310: Connection refused


設定が足りないらしい


今日はココまで





## aide(改ざん検知)





## apache

## mysql

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