Tag Archives: VestaCP

Vesta Control Panel にMonit Service Manager導入

Published by:

VESTACP は便利だが、サービス止まった時の監視、再起動ツールがないかと調べたら、あった。

monitという、GPLライセンスでLinux/BSD/Solaris上で動作可能な総合監視デーモンとしてファイルシステムからHTTPレスポンス内容・プロセス監視などの機能を持っている。

monitインストール:

yum -y install monit
chkconfig monit on

monit設定:

# Vesta Control Panel
wget http://c.vestacp.com/0.9.8/rhel/monit/vesta-nginx.conf -O /etc/monit.d/vesta-nginx.conf
wget http://c.vestacp.com/0.9.8/rhel/monit/vesta-php.conf -O /etc/monit.d/vesta-php.conf
# Nginx
wget http://c.vestacp.com/0.9.8/rhel/monit/nginx.conf -O /etc/monit.d/nginx.conf
# Apache
wget http://c.vestacp.com/0.9.8/rhel/monit/httpd.conf -O /etc/monit.d/httpd.conf
# MySQL
wget http://c.vestacp.com/0.9.8/rhel/monit/mysql.conf -O /etc/monit.d/mysql.conf
# Exim
wget http://c.vestacp.com/0.9.8/rhel/monit/exim.conf -O /etc/monit.d/exim.conf
# Dovecot
wget http://c.vestacp.com/0.9.8/rhel/monit/dovecot.conf -O /etc/monit.d/dovecot.conf
# ClamAV
wget http://c.vestacp.com/0.9.8/rhel/monit/clamd.conf -O /etc/monit.d/clamd.conf
# Spamassassin
wget http://c.vestacp.com/0.9.8/rhel/monit/spamassassin.conf -O /etc/monit.d/spamassassin.conf
# OpenSSH
wget http://c.vestacp.com/0.9.8/rhel/monit/sshd.conf -O /etc/monit.d/sshd.conf

最後にサービスを起動する

service monit start

sambaためのVestaCP設定

Published by:

新しいASUSノートPCを自宅サーバのsambaにアクセスしようとして、サーバ見つからないと、不可解の問題にぶつかり合う。

既存PCアクセスできるのに、新しいASUSノートPCの問題と思っていろいろ試行錯誤を繰り返し。

サーバの設定は自宅のため、一番簡単な設定した。

[share]
comment = Share Files
writeable = yes
public = yes
path = /opt/share

Googleで”samba windows 設定”を検索したところ、目がsamba 「ファイアウォール設定」のところに止まった。

ファイアウォールを設定している場合、Samba サーバが使用するポート(udp:137,138, tcp:139,445)を開放する必要がある。

自宅サーバに、VestaCP後で導入したので、ファイアウォールが増設になった。

早速VestaCPのFirewall設定に下記の項目を追加した。

vestacp-samba

予想通り、新しいASUSノートPCから自宅サーバのsambaにアクセスできた。

/etc/iptables.rulesを見ると、下記の数行がついかされた。

-A INPUT -p udp -m multiport –dports 137,138 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 445 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 139 -j ACCEPT

しかし、なぜVesta導入前の既存PCから、ファイアウォール設定関係なくsambaにアクセスできることが、謎でした。