FreeBSD 11.2 RELEASE - Webmin - インストール
1. ports Webmin はブラウザを通してサーバマシンを管理できるツールです。 詳細は「Wikipedia」を参照してください。 2. ports cd /usr/ports/sysutils/webmin/ make make install 3. セットアップ 以下の要領で初期セットアップを行います。 > /usr/local/lib/webmin/setup.sh 以下、入力のプロンプトがあるところのみ抜粋しています。 ↓Webmin のログ出力先(変更なしであれば Enter) Log file directory [/var/log/webmin]: ↓perl の存在するディレクトリ(変更なしであれば Enter) Full path to perl (default /usr/local/bin/perl): ↓アクセスするポート番号(変更なしであれば Enter) Web server port (default 10000): ↓Webmin にログインするユーザ名を入力 Login name (default admin): ↓パスワードを2回入力(エコーバックされない) Login password: Password again: ↓SSL 使用の有無(y を推奨) Use SSL (y/n): y Enter ポート番号等、変更可能ですが、ポートスキャンされればポートは確認されてしまいますので、ポート番号を変更するしないより、後述する IP アドレス制限により接続可能なアドレスを制限すべきです。 SSL はセキュリティのために使用すべきです。 4. /etc/rc.conf の編集 /etc/rc.conf に以下の1行を追加します。 webmin_enable="YES" 5. 起動 起動スクリプトは /usr/local/etc/rc.d/webmin です。 service webmin start で起動します。 6. /etc/newsyslog の編集 いつの段階で変わったのかよくわかりませんが、Webmin のログは /var/log/webmin/miniserv.error /var/log/webmin/miniserv.log になっているようです。 一応、参考までにわたしのログローテーション設定は /usr/local/etc/newsyslog.conf.d/webmin.conf を作成して、以下のように記述しています。 # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/webmin/*.log 644 10 100 * BG /var/log/webmin/*.error 644 10 100 * BG フラグ等の意味は「メンテナンス・トラブルシュート - ログ」をご参照ください。
cd /usr/ports/sysutils/webmin/ make make install
> /usr/local/lib/webmin/setup.sh 以下、入力のプロンプトがあるところのみ抜粋しています。 ↓Webmin のログ出力先(変更なしであれば Enter) Log file directory [/var/log/webmin]: ↓perl の存在するディレクトリ(変更なしであれば Enter) Full path to perl (default /usr/local/bin/perl): ↓アクセスするポート番号(変更なしであれば Enter) Web server port (default 10000): ↓Webmin にログインするユーザ名を入力 Login name (default admin): ↓パスワードを2回入力(エコーバックされない) Login password: Password again: ↓SSL 使用の有無(y を推奨) Use SSL (y/n): y Enter
/etc/rc.conf
webmin_enable="YES"
/usr/local/etc/rc.d/webmin
service webmin start
/var/log/webmin/miniserv.error /var/log/webmin/miniserv.log
/usr/local/etc/newsyslog.conf.d/webmin.conf
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/webmin/*.log 644 10 100 * BG /var/log/webmin/*.error 644 10 100 * BG