LinuxモニタソフトウェアMonitorix 3.5へのログイン認証鍵の追加

1799 ワード

monitorixは良いLinuxシステム監視ソフトウェアです.E文を知らない友人の多くは、Monitorixにログインキーを追加する方法を知らない可能性があります.
    簡単にご紹介しましょう(Monitorixはインストールが簡単で、メッセージがわかりません):
    「関連プロファイル」セクション:
<httpd_builtin>
	enabled = y
	host =
	port = 8080
	user = nobody
	group = nogroup
	log_file = /var/log/monitorix-httpd
	hosts_deny =
	hosts_allow =
	<auth>
		enabled = y  #      y
		msg = Monitorix: Restricted access
		htpasswd = /var/lib/monitorix/htpasswd
	</auth>
</httpd_builtin>

   外国人の英語の鍵はここに関連しています.
   htpasswd This option sets the path to the password file that was created with the help of the htpasswd.pl script. That script encrypts and validates passwords using the system’s crypt() routine. If your Monitorix package doesn’t come with that script, you may use the similar htpasswd(1) program provided with the Apache web server.
    The format of the password file consist of one or more lines with a username and password separated by a colon.
    The following is an example of a password file:
    paul:oGkEsQK6RYIII peter:HF1r7qRL4Kg6E
    Since the script uses the crypt() algorithm, only the first 8 characters of the password are used to form the password. If the supplied password is longer, the extra characters will be silently discarded.
Default value:/var/lib/monitorix/htpasswd
    実は多くの人がどのように鍵を生成するか、以下は私が簡単なPerlスクリプトを提供して、鍵を生成して、追加します
   /var/lib/monitorix/htpasswd
    できます.
#!/usr/bin/perl
use strict;  #http://www.zizaiyou.cn
my $pw=$ARGV[0];
print crypt($pw,$pw)."
";

使用法:./passwd.plパスワード
    OK、これでいいです.
    译文1私のブログから転載:http://www.jincon.com/archives/194/
    私はまたやって、monitorixの中国語の翻訳のページ(まだ翻訳が終わっていないで、精力は有限で、ゆっくりと翻訳中):http://monitorix.jincon.com/