Recent Posts

Archives

Blog Ranking

Favorite

ExchangeRate

Update: 2012-02-07 21:00
by ロイター
 

Archive for 3 月, 2009

Next Entries »
 

SSL自己証明書(オレオレ証明書)作成

木曜日, 3 月 5th, 2009

opensslがすでにパッケージでインストールされているものとします。

 # cd /etc/pki/tls/certs
 # make xxxxxxxx.pem

これだけです。

通常のCSR作成時と同様に証明書の記載内容を聞かれるので、
適当に入れておきます。

簡単ですね。

↓役に立ったと思ったら・・・

 

 

Monitでサーバ監視(2)

水曜日, 3 月 4th, 2009

前回の続き。

/etc/monit.confを編集します。

 —–
 # 監視を行う間隔
 set daemon 300

 # ログファイルの記述
 set logfile syslog facility log_daemon

 # アラートメール用メールサーバ
 set mailserver localhost

 # アラートメール送信先
 # monitの再起動とかでもメールが送られるので注意
 # ボクはコメントアウトしてます
 #set alert xxxxx@funny-k.com

 # アラートメールのフォーマット
 set mail-format {
  subject: Server Alert
  rom: zzzzz@funny-k.com
  message: $ACTION $SERVICE at $DATE on funny-k.com
 }

 # 管理画面の設定
 set httpd port 10080
 use address 0.0.0.0
 SSL ENABLE
 PEMFILE /etc/monit.d/funny-k.com.pem
 allow userid:password

 # 外部設定ファイルのインクルード
 include /etc/monit.d/*
 —–

管理画面はSSLを使用します。使用しなくてもできますが、ボクはつかいます。
当然自己署名(オレオレ証明書というらしいです)のセットです。
証明書の作り方は次回。

次はサービスごとの設定。

まずhttpd。
設定ファイルは/etc/monit.d/httpd.confとでもしましょう。
 —–
 check process apache with pidfile /var/run/httpd.pid
 start program “/etc/init.d/httpd start”
 stop program “/etc/init.d/httpd stop”
 alert xxxxx@funny-k.com
 if failed host [...]

Next Entries »