2009年1月30日金曜日

UPSの確かめ

UPSの電源コードを抜きました
Broadcast Message from root@thaw (somewhere) at 8:56 ...
Warning power loss detected on UPS UPS_IDEN

Broadcast Message from root@thaw (somewhere) at 8:56 ...
Power failure on UPS UPS_IDEN. Running on batteries.

UPSの電源コードを電源に挿しました
Broadcast Message from root@thaw (somewhere) at 8:56 ...
Power has returned on UPS UPS_IDEN...

2009年1月29日木曜日

APC 無停電電源装置の状態

帰宅してから(この間、18KMランニングトレーニングしてました)、職場のサーバーに接続して、無停電電源装置を見る。
ここに詳しく情報が書いてあるので便利でした。
http://www.itmedia.co.jp/help/howto/linux/ups/index.html
シリアルケーブルの接続だし、デフォルト設定で問題なかった。(^_^)v

root@thaw:~# apctest
2009-01-29 22:04:18 apctest 3.12.4 (19 August 2006) debian
Checking configuration ...
Attached to driver: apcsmart
sharenet.type = DISABLE
cable.type = CUSTOM_SMART

You are using a SMART cable type, so I'm entering SMART test mode
Unknown mode.type: 11
Setting up the port ...
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing Smart UPSes.
Please select the function you want to perform.

1) Query the UPS for all known values
2) Perform a Battery Runtime Calibration
3) Abort Battery Calibration
4) Monitor Battery Calibration progress
5) Program EEPROM
6) Enter TTY mode communicating with UPS
7) Quit

Select function number: 1

I am going to run through the series of queries of the UPS
that are used in initializing apcupsd.

Simulating UPSlinkCheck ...
Wrote: Y Got: SM
Attempting to use smart_poll() ...
Sent: Y Got: SM Good -- smart_poll() works!.

Going to ask for valid commands...
Protocol version is: 3
Alert characters are: !$%+?=#|
Command characters are: ^A^N^Z')+-89>@ABCDEFGKLMNOPQRSUVWXYZabcefgjklmnopqrsuxyz~^M

Now running through apcupsd get_UPS capabilities().
NA indicates that the feature is Not Available

UPS Status: 08
Line quality: FF
Reason for last transfer to batteries: T
Self-Test Status: NO
Line Voltage: 102.9
Line Voltage Max: 103.6
Line Voltage Min: 102.9
Output Voltage: 102.9
Batt level percent: 100.0
Batt voltage: 27.27
UPS Load: 027.9
Line freq: 50.00
Runtime left: 0048
UPS Internal temp: 021.6
Dip switch settings: NA
Register 1: 00
Register 2: 00
Register 3: 00
Sensitivity: H
Wakeup delay: 000
Sleep delay: 060
Low transfer voltage: 092
High transfer voltage: 110
Batt charge for return: 00
Alarm status: 0
Low battery shutdown level: 02
UPS Name: UPS_IDEN
UPS Self test interval: 336
UPS manufacture date: 12/06/01
UPS serial number: AS0149110975
Date battery replaced: 12/06/01
Output voltage when on batteries: 100
Nominal battery voltage: 024
Percent humidity: NA
Ambient temperature: NA
Firmware revision: 162.4.A
Number of external batteries installed: 000
Number of bad batteries installed: NA
UPS model as defined by UPS: KWA
UPS EPROM capabilities string: uD43127130133136uA43108110112114uI43253257261265uM43225229233237lD43106103100097lA43092090088086lI43208204200196lM43182178174170e4820015253550607590oD13120oA13100oI43230240220225oM13208s441HMLLq4820205071012151820p483020060120240480720960000k4410TLNr483000020060120240480720960E443336168ON OFF
The EPROM string is 293 characters long!
Hours since last self test: NA

That is all for now.

1) Query the UPS for all known values
2) Perform a Battery Runtime Calibration
3) Abort Battery Calibration
4) Monitor Battery Calibration progress
5) Program EEPROM
6) Enter TTY mode communicating with UPS
7) Quit

Select function number: 7
2009-01-29 22:04:39 End apctest.

root@thaw:~# /etc/init.d/apcupsd start
Starting APC UPS power management: apcupsd.

root@thaw:~# /sbin/apcaccess status
APC : 001,051,1201
DATE : Thu Jan 29 22:05:48 JST 2009
HOSTNAME : thaw
RELEASE : 3.12.4
VERSION : 3.12.4 (19 August 2006) debian
UPSNAME : UPS_IDEN
CABLE : Custom Cable Smart
MODEL : Smart-UPS 1400 RM
UPSMODE : Stand Alone
STARTTIME: Thu Jan 29 22:05:29 JST 2009
STATUS : ONLINE
LINEV : 102.9 Volts
LOADPCT : 27.9 Percent Load Capacity
BCHARGE : 100.0 Percent
TIMELEFT : 48.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
MAXLINEV : 103.6 Volts
MINLINEV : 102.9 Volts
OUTPUTV : 102.9 Volts
SENSE : High
DWAKE : 000 Seconds
DSHUTD : 060 Seconds
DLOWBATT : 02 Minutes
LOTRANS : 092.0 Volts
HITRANS : 110.0 Volts
RETPCT : 000.0 Percent
ITEMP : 21.6 C Internal
ALARMDEL : 5 seconds
BATTV : 27.3 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Line voltage notch or spike
NUMXFERS : 0
TONBATT : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI : 336
STATFLAG : 0x07000008 Status Flag
REG1 : 0x00 Register 1
REG2 : 0x00 Register 2
REG3 : 0x00 Register 3
MANDATE : 12/06/01
SERIALNO : AS0149110975
BATTDATE : 12/06/01
NOMOUTV : 100
NOMBATTV : 24.0
EXTBATTS : 0
FIRMWARE : 162.4.A
APCMODEL : KWA
END APC : Thu Jan 29 22:06:06 JST 2009
root@thaw:~#

今度、電源ケーブルを抜いて、さらに調べよう。

無停電電源装置の接続

職場のサーバーにUPS(APC社製)を接続します。
とりあえず、apcupsdをインストールしました。
root@thaw:~# aptitude install apcupsd
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています... 完了
拡張状態情報を書き込んでいます... 完了
タスクの記述を読み込んでいます... 完了
タグのデータベースを構築しています... 完了
以下の新規パッケージが自動的にインストールされます:
libsensors3 libsnmp-base libsnmp9 libsysfs2
以下の新規パッケージがインストールされます:
apcupsd libsensors3 libsnmp-base libsnmp9 libsysfs2
更新: 0 個、新規インストール: 5 個、削除: 0 個、保留: 0 個。
3479kB のアーカイブを取得する必要があります。展開後に 7950kB のディスク領域が新たに消費さ れます。
続けますか? [Y/n/?] Y
拡張状態情報を書き込んでいます... 完了
取得:1 http://dennou-h.gfd-dennou.org etch/main libsysfs2 2.1.0-1 [27.0kB]
取得:2 http://dennou-h.gfd-dennou.org etch/main libsensors3 1:2.10.1-3 [82.5kB]
取得:3 http://dennou-h.gfd-dennou.org etch/main libsnmp-base 5.2.3-7etch4 [1214kB]
取得:4 http://dennou-h.gfd-dennou.org etch/main libsnmp9 5.2.3-7etch4 [1839kB]
取得:5 http://dennou-h.gfd-dennou.org etch/main apcupsd 3.12.4-2 [316kB]
3479kB を 43s 秒でダウンロードしました (80.6kB/s)
未選択パッケージ libsysfs2 を選択しています。
(データベースを読み込んでいます ... 現在 50476 個のファイルとディレクトリがインストールさ れています。)
(.../libsysfs2_2.1.0-1_i386.deb から) libsysfs2 を展開しています...
未選択パッケージ libsensors3 を選択しています。
(.../libsensors3_1%3a2.10.1-3_i386.deb から) libsensors3 を展開しています...
未選択パッケージ libsnmp-base を選択しています。
(.../libsnmp-base_5.2.3-7etch4_all.deb から) libsnmp-base を展開しています...
未選択パッケージ libsnmp9 を選択しています。
(.../libsnmp9_5.2.3-7etch4_i386.deb から) libsnmp9 を展開しています...
未選択パッケージ apcupsd を選択しています。
(.../apcupsd_3.12.4-2_i386.deb から) apcupsd を展開しています...
libsysfs2 (2.1.0-1) を設定しています ...

libsensors3 (2.10.1-3) を設定しています ...
udev active, devices will be created in /dev/.static/dev/

libsnmp-base (5.2.3-7etch4) を設定しています ...

libsnmp9 (5.2.3-7etch4) を設定しています ...

apcupsd (3.12.4-2) を設定しています ...
Please check your configuration ISCONFIGURED in /etc/default/apcupsd

2009年1月28日水曜日

mysql データベース

少し前まで、管理しているデータベースは、MSのSQLサーバーとLinux上のPostgreSQLでしたが、最近は、転勤したこともあり、とんといじらなくなり、この頃このブログにも書いているように、この1週間近くはmysqlをさわっています。

で、ふと気になったのがユーザー管理です。
最初に、root@localhostにパスワードを設定し、空userは削除しました。
しかしmysql データベースのuser.userテーブルをみるとパスワードの無いものが1つある。
root@localhostにはパスワードを設定したんだが、もうひとつのrootユーザーがあって、パスワードが無い。もちろん速攻でsetpasswordをしました。

自分でいうのもなんだけど、インターネット上の情報でMovable TypeとかWord Pressのインストールしていると、ユーザー管理の甘いmysqlサーバーが沢山出来ている気がするなあ。

そういうサーバーは大丈夫なんだろうか(心配してもしょうがないか(^^;))

2009年1月27日火曜日

cpan メモ

職場は、httpポートしか接続できない少し厳しいプロクシがかかってます。
その中で、cpanでモジュールをインストールすると結構不便で、接続できないことが起こります。
で、現在はうまくいったのでメモしておきます。
~# perl -MCPAN -e shell
cpan>o conf init
で設定。
CPAN::Config options from /etc/perl/CPAN/Config.pm: commit
Commit changes to disk defaults
Reload defaults from disk init
Interactive setting of all options
build_cache 10
build_dir /root/.cpan/build
cache_metadata 1 cpan_home /root/.cpan
cpan_version_check 1
dontload_hash
ftp
ftp_proxy getcwd cwd
gpg /usr/bin/gpg
gzip /bin/gzip histfile /root/.cpan/histfile
histsize 100
http_proxy 192.168.***.***:8080
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /root/.cpan/sources
lynx /usr/bin/lynx
make /usr/bin/make
make_arg
make_install_arg UNINST=1
makepl_arg
INSTALLDIRS=site
ncftpget
no_proxy
pager /usr/bin/less
prerequisites_policy ask
proxy_user
scan_cache atstart
shell /bin/bash
tar /bin/tar term_is_latin 1
unzip /usr/bin/unzip
urlist http://cpan.sarang.net/
urllist http://cpan.sarang.net/
wget /usr/bin/wget

cpanの設定を変更するときは
cpan>o conf
ですが、設定が面倒なので、手動で書き換えることも(^_^;)
CPAN/Config.pm
をnano やemacsで直接書きました。

ポイント
  1. lynxのプロクシ設定をしっかりやること。
  2. http経由のcpanサーバを選ぶこと

ですが、なんと日本は全滅でした。しょうがないので韓国のsarang.neにしましたが・・・

2009年1月26日月曜日

wordpressの設定のまとめ

実に簡単に設定できる高機能なウェブログです。

1.wp-config.phpにutf-8で、データベース接続情報などを書き込みます。

// ** MySQL 設定 - こちらの情報はホスティング先から入手してください。 ** //
/** WordPress のデータベース名 */
define('DB_NAME', 'wp_db');

/** MySQL のユーザー名 */
define('DB_USER', 'user);

/** MySQL のパスワード */
define('DB_PASSWORD', 'test_password');

/** MySQL のホスト名 (ほとんどの場合変更する必要はありません。) */
define('DB_HOST', 'localhost');

/** データベーステーブルのキャラクターセット (ほとんどの場合変更する必要はありません。) */

define('DB_CHARSET', 'utf8');

/** データベースの照合順序 (ほとんどの場合変更する必要はありません。) */
define('DB_COLLATE', '');

/**#@+
* 認証用ユニークキー
*
* それぞれを異なるユニーク (一意) な文字列に変更してください。
* {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org の秘密鍵サービス}
* で自動生成することもできます。
*
* @since 2.6.0
*/
define('AUTH_KEY', 'example');
define('SECURE_AUTH_KEY', 'example');
define('LOGGED_IN_KEY', 'example');
define('NONCE_KEY', 'example');
/**#@-*/

/**
* WordPress データベーステーブルの接頭辞
*
* それぞれにユニーク (一意) な接頭辞を与えることで一つのデータベースに複数の WordPress を

* インストールすることができます。半角英数字と下線のみを使用してください。
*/
$table_prefix = 'ex_';

/**
* ローカル言語 - このパッケージでは初期値として 'ja' (日本語 UTF-8) が設定されています。
*
* WordPress のローカル言語を設定します。設定した言語に対応する MO ファイルが
* wp-content/languages にインストールされている必要があります。例えば de.mo を
* wp-content/languages にインストールし WPLANG を 'de' に設定することでドイツ語がサポート
されます。
*/
define ('WPLANG', 'ja');
2.mysqlに接続して、データベースを作成します。
# mysql -u root -p
mysql> CREATE DATABASE wp_db;
mysql> SHOW DATABASES;

mysql> GRANT ALL PRIVILEGES ON wp_db.* TO 'user@localhost' IDENTIFIED BY 'test_password';
mysql> FLUSH PRIVILEGES;


3.$HOME/wp-config.php
に接続して、「あっ」という間にできあがりです。

4.パスワードを再設定、できればwordpressの再配置をしてできあがり。

2009年1月25日日曜日

movable type4のインストール

自宅サーバーに、個人利用は無料であるmovable typeをインストールしてみる。
apache2のconfファイルの設定を変更して、movable typeをいれる場所を確保する。
Alias /mt/ /home/httpd/mt/
<Directive ・・・・・・・

で、http://myhomepage/mt/mt-check.cgiでチェックする。
最低限必要なものは入っている。オプションがいくつか入っていない。

Crypt::DSA

Archive::Zip

HTML::Entities

GD

Archive::Tar

IO::Uncompress::Gunzip

IO::Compress::Gzip

XML::Atom

Mail::Sendmail

これらが足りない。なくてもなんとかなるいうが、debian etchにインストールしてみよう。
モジュールGDは、
aptitude install libgd-gd1-perl でインストールして対処。
のこりのA::Bのモジュールですが、Cpanでインストールするようです。
で、Cpanを設定して、インストールすると・・・・エラーが出る(T_T)。

cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"3.59\" -DXS_VERSION=\"3.59\" -fPIC "-I/usr/lib/perl/5.8/CORE" -DMARKED_SECTION Parser.c
/bin/sh: cc: command not found
make: *** [Parser.o] Error 127
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

aptitude install gcc

これは、gccがたりなさそう。
て、訳で、
aptitude install gcc
また、cpanで・・・
今度は次々とうまく出来ました(^_^)v。

今度は、職場のmovable-typeのインストールチェック!!
同じようにGDのインストールをします。
それから、XML:Atom
しかし、次のようなエラーが・・・

1 test skipped.
Failed 19/20 test scripts, 5.00% okay. 143/143 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force

よく分かりません。
makeは入っているし・・・?
で、makeできない理由として、XML関係のlibがもしかして無い?と思い、
aptitude install xml2-dev
今度は、cpanからinstall makeが出来ました。

2009年1月21日水曜日

iptableのredirect

たまに利用するものとして、iptableのリダイレクト機能がある。

iptables -t nat -A PREROUTING -s 192.168.0.1 -p tcp --dport www -j REDIRECT --to-ports 22

これは、www番ポートをssh番ポート22にリダイレクトさせるものです。
結構役に立つ。

2009年1月19日月曜日

XOOPSにカウンター

カウンターを調べてみると、若干のモジュールがある。
ZIPを解凍すると、文字化け(shift_JIS)していた。
で、UTF-8に一括変換する。
$ find . -name "*" -print0 | xargs -0 nkf -w -Lu --overwrite
ゴミファイルを削除する。

で、モジュールをインストールすると・・・・
なんとXOOP2用のみで、動作しないことが判明した。
そうか・・・XOOPS Cube Legacy 用であることを調べないと駄目なんだなあ!

debian etch でのsquirrelmail ja_JPの設定

職場と家で、squirrelmail を導入しましたが、何故か職場のほうはメニューが英語表示にしかならない。これは手強い。

で、squirrelmail/src/configtest.phpを実行すると、ja_JPがないという情報が返っている。
で、ネットで調べると、
aptitude install gettext
および、/usr/share/squirrelmail/local
にja_JPがないのでインストールして、./compilepo ja_JP を行え!ということで、ja_JP-1.4.9-20070106.zip を入手し、無事ja_JPが読み込まれた。
で、
# /usr/sbin/squirrelmail-configure
で、default language をja_JPにできました  とさ。

たぶん、職場の方は最低限のサーバー類しか入れていないので、何らかのパッケージが足りないのだろう。そのパッケージぐらいいれろよ!→自分(^_^;)

2009年1月18日日曜日

debian etch でのGDライブラリ

XOOPSを携帯端末で見ていると、画面のリサイズ問題が出てきた。
で、このdebian etchでは、GDライブラリが働いていないようだ。
ライブラリが足りないのか、ネットで調べてlibjpeg**-devなど分かったが、既にインストールされている。
やばい!aptitudeは駄目で、コンパイルしてインストか!とドキドキしましたが、、「/etc/php5/cgi/php.ini を見よ!」という情報もあり、次のコメントを外して、
extension=mysql.so
extension=gd.so
/etc/ini.d/apache2-force-reload
で、ようやく動いた。

XOOPS newfilebb のメモ

ファイルのアップローダー・ダウンローダーのために、newfilebb というモジュールを使う。
1 adminで通常のインストール
2 file.ini.php で、uploadsの位置を決め(必要なら名前も変える)、その為のフォルダを作り、パミッションを設定する。
3 newbbのカテゴリとフォーラムをadminでつくり、アップロード等の出来る権限を作る。
4 newbbの全般設定で、ファイル容量を設定する。
5 2のアップロードディレクトリのアップロードしたいファイルの拡張子等、httpd.confに設定する
  Options ExecCGI
AddType ・・・・・・・・・・・・
  (.htaccessファイルの方がよいかも)
てな、感じか。

2009年1月17日土曜日

不正アタック









ji





左は自宅のSquirrelMail 右は職場のSquirrekMailである。いつの間にか自宅の方が日本語化している(@o@)。
ほとんど同じものになるように設定していたんだが???まあ、職場の方も日本語化にそのうちなるだろう。
もしかしたら、
「Debian GNU/linux 3.0(Woody)
Debian GNU/Linux 3.0インストール時に日本語のlocaleを設定したにもかかわらず設定されないバグがあります。
# dpkg-reconfigure locales
を実行して再度ja_JP.eucJPを設定してください。
その後Apacheをリスタートすると表示されるようになります。」

これかも知れないので、明日確かめてみよう

自宅のメールサーバに不正なリレーをさせようと狙っている者がいる。
まあ、relayを許可しているのは内部ネットワークだけなんで、無意味ですね。

Jan 11 22:47:24 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:24 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:25 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:25 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:26 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:28 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:32 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:37 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:41 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:46 oh postfix/smtpd[5089]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=
Jan 11 22:47:49 oh postfix/smtpd[5089]: too many errors after DATA from unknown[125.120.100.160]
Jan 11 22:47:49 oh postfix/smtpd[5089]: disconnect from unknown[125.120.100.160]
Jan 11 22:51:09 oh postfix/anvil[5090]: statistics: max connection rate 1/60s for (smtp:125.120.100.160) at Jan 11 22:47:23
Jan 11 22:51:09 oh postfix/anvil[5090]: statistics: max connection count 1 for (smtp:125.120.100.160) at Jan 11 22:47:23
Jan 11 22:51:09 oh postfix/anvil[5090]: statistics: max cache size 1 at Jan 11 22:47:23
Jan 12 09:29:34 oh postfix/smtpd[6248]: connect from Palomino.mail-abuse.org[168.61.5.29]
Jan 12 09:29:34 oh postfix/smtpd[6248]: 9069D17C757: client=Palomino.mail-abuse.org[168.61.5.29]
Jan 12 09:29:34 oh postfix/cleanup[6251]: 9069D17C757: message-id=
Jan 12 09:29:34 oh postfix/qmgr[2573]: 9069D17C757: from=, size=2184, nrcpt=1 (queue active)
Jan 12 09:29:35 oh postfix/smtpd[6248]: disconnect from Palomino.mail-abuse.org[168.61.5.29]
Jan 12 09:29:35 oh postfix/local[6252]: 9069D17C757: to=, relay=local, delay=0.82, delays=0.54/0.23/0/0.0
5, dsn=2.0.0, status=sent (delivered to maildir)
Jan 12 09:29:35 oh postfix/qmgr[2573]: 9069D17C757: removed
Jan 12 09:32:55 oh postfix/anvil[6249]: statistics: max connection rate 1/60s for (smtp:168.61.5.29) at Jan 12 09:29:34
Jan 12 09:32:55 oh postfix/anvil[6249]: statistics: max connection count 1 for (smtp:168.61.5.29) at Jan 12 09:29:34
Jan 12 09:32:55 oh postfix/anvil[6249]: statistics: max cache size 1 at Jan 12 09:29:34
Jan 12 22:21:43 oh postfix/pickup[7124]: 1A5BE17C75A: uid=33 from=
Jan 12 22:21:43 oh postfix/cleanup[7267]: 1A5BE17C75A: message-id=<08c3c8d149a463d621576a95e151604f@oh>
Jan 12 22:21:43 oh postfix/qmgr[2573]: 1A5BE17C75A: from=, size=1048, nrcpt=1 (queue active)
Jan 12 22:21:43 oh postfix/pickup[7124]: 39E3917C757: uid=33 from=
Jan 12 22:21:43 oh postfix/cleanup[7271]: 39E3917C757: message-id=
Jan 12 22:42:47 oh postfix/smtpd[7304]: connect from unknown[125.120.100.160]
Jan 12 22:42:48 oh postfix/smtpd[7304]: NOQUEUE: reject: RCPT from unknown[125.120.100.160]: 554 5.7.1 : Re
lay access denied; from= to= proto=ESMTP helo=


XOOPS と 無料のサブドメイン

XOOPの設定を、windows上で行いますが、サーバ機がdebianなので、内部ネットワーク内での環境になります。これは、XOOPS_ROOT/mainfile.phpを編集すれば外部で見られるようになります。

家のサーバは、固定IPをもらっていないので、ddns(ダイナミックdns)でサブドメインをもらっています。
dyndns.org と家サーバープロジェクト(ieServer.Net)です。
ところで、内部ネットワークでも、外部インターネット世界と同じようにdebian機(ウェブサーバー)を見られるようにするためには、名前の解決でサーバー機のFQDNをローカルなネットワークパソコンで、primaryに見られるようにする必要が有りそうです。

で、とりあえず、子機であるwindows XP機のhostsファイルとlmhostsファイルにサーバーのFQDN名を登録しておきました。

名前の解決は、普通
dnsキャッシュ→lmhosts→hosts→dns
だから、ddnsのサブドメインの名前が解決されます。ただ、念のために、debian機にも、/etc/hostsファイルにFQDNをローカルIPに割り当ててありますが。

2009年1月16日金曜日

XOOPS うさぎバージョン



XOOPSの「うさぎバージョン」を入れてみた。
これは、UTF-8をサポートしている有りがたいものです。入れてみると文字化けが発生しない(^_^)。

という訳で、今度からこれを使って実験します。

2009年1月14日水曜日

XOOPS altsys(D3モジュール)の追加

XOOPS_ROOT内にある、main.phpで
XOOPS_TRUST_PATHを定義します。
そして、定義したフォルダをapacheのdoc root以外にmkdirします。

どこかtempフォルダ内で、unzip altsys.zip
を展開します。
./htmlフォルダ と./xoops_trust_pathフォルダ
が作られます。
これをマニュアルに沿って
XOOPS_ROOT と XOOPS_TRUST_PATHフォルダにコピーします。
で、管理画面のモジュールの追加を行います





あっという間に追加されます














管理メニューにaltsysのメニューが追加されました













同様にして、同じ作者のd3forumとpicoをコピーして置いたところ。

Xoops でNewsbbモジュールのインストール


今度は、ファイルアップローダー付きNewsモジュール
msExcel msWord などのファイルは動画・画像などはアップロードができる。

で一太郎はどうかな?・・・といつもどうり調査してみる。

Upload Denied...application/x-js-taro ext jtd

とやっぱり駄目だ。

で、admin管理画面から、ファイル拡張子を増やしてみる。これも駄目。
そこで、apache2のconfiguretion fileを編集しておく。
AddType application/x-js-taro .jtd .jtt .jfw .jbw
で、admin管理画面から、ファイル拡張子に、x-js-taro で追加して、エラーなくアップロードができた。(^_^)

というわけで、apacheの設定と、phpの設定両方が必要のようだ。

Xoops でNewsモジュールのインストール

Xoopsでは、モジュールを入れないとただの箱のようだ。
そこで、Newsモジュールというものを入れてみよう。

結局、左に様な画面になった







これはモジュールがなにも無いということか。












これはダウンロードしてきたNewsモジュールを/modules/Newsフォルダとしてコピーしてきた状態をadmin管理画面で見たもの
このように自動的に登録されるようだ。











で、インストールボタンを押した状態。
あっ。Newsフォルダにあるinstall.txtはしっかり読んでおいた。
互換モジュール ≫≫ モジュールの管理 ≫≫ モジュールのインストール ≫≫ モジュールインストール終了
モジュールインストール ログ

* Table c879b4_stories created.
* Table c879b4_stories_files created.
* Table c879b4_topics created.
* Data inserted to table c879b4_topics
* Table c879b4_stories_votedata created.
* テンプレート news_item.html をインストールしました
* テンプレート news_archive.html をインストールしました
* テンプレート news_article.html をインストールしました
* テンプレート news_index.html をインストールしました
* テンプレート news_by_topic.html をインストールしました
* テンプレート news_by_this_author.html をインストールしました
* テンプレート news_ratenews.html をインストールしました
* テンプレート news_rss.html をインストールしました
* テンプレート news_whos_who.html をインストールしました
某某   とでてくる







つぎのインストールの仕方はよく見ておく。

How to install News
====================

News is installed as a regular XOOPS module, which means you should copy the
complete /news folder into the /modules directory of your website. Then log in
to your site as administrator, go to System Admin > Modules, look for the News
icon in the list of uninstalled modules and click in the install icon. Follow
the directions in the screen and you'll be ready to go.

Please verify that the modules\news\images\topics directory is writable on the
server (read+write e.g. chmod=777).

After having created your first topic (category), and before creating your first
article/news, you need to click on Permission Tab to set groups permissions.

2009年1月13日火曜日

XOOPS のテーマ変更


とりあえず、XOOPSのテーマをダウンロードして、変更してみました。
オリジナルなものは、味も素っ気も無い。












これが、xoopsルーフォルダ/themas/
にコピーしてから、管理画面で見た状態です。









簡単にテーマ(外観)が変更されました。
便利です(^_^)

CMSなウェブシステム

自宅のウェブサーバーにXOOPS キューブを入れてみた。うーん、もうちょっと使ってから要点を書いてみようかな。文字コードがEUCでdebian etchがUTF-8で、瞬時に文字化けすることがあり、ちょっと・・・・な感じです。

また、トレンドマイクロからメールが来た

122.249.xxx.xxx is listed on our Dynamic User List (DUL) becauseit appears to be an address which is dynamically-assigned.This does not imply that you are a spammer, though a greatdeal of spam comes from zombied computers using similaraddresses. Further details may be found at
http://www.mail-abuse.com/support/enduserinfo_dul.html
Since neither DNS nor whois information indicates any associationbetween you and this address we need to hear from an authorizedrepresentative of your ISP before considering any removal ofthe listing.
If this is a dynamic address, please contact your ISP for helpin configuring your computer to relay mail through their mailserver, or see
http://www.mail-abuse.com/an_rteoutgoing.html
If you believe this listing is in error, please invite yourISP's abuse department to contact us at dul@mail-abuse.com.
--Trend Micro, NSSG (formerly MAPS, a division of Kelkea)http://www.mail-abuse.com/

要約すると
122.249.xxx.xxx、ダイナミックに割り当てられたアドレスであるように見えるので、私たちのDynamic User List(DUL)に記載されています。これは、あなたがスパマーであることを意味しません、多くのスパムがゾンビコンピュータからダイナミックアドレスを使用することで来ていますが。 詳細はhttp://www.mail-abuse.com/support/enduserinfo_dul.html で見つけられるかもしれません。
どちらもDNSかwhois以来、情報はあなたと私たちがリストのどんな取り外しも考える前にあなたのISPの正式代表者から聞く必要があるこのアドレスとのどんな仲間も示します。
これがダイナミックなアドレスであるなら、あなたのプロバイダのメールサーバを通してメールをリレーするように、ISPに連絡するか、またhttp://www.mail-abuse.com/an_rteoutgoing.html を見てください。
このリストが間違っていると信じているなら、あなたのISPの乱用部が dul@mail-abuse.com へ私たちに連絡するよう導いてください。
--トレンドマイクロ、NSSG(以前MAPS、Kelkeaの分割) http://www.mail-abuse.com/

ようするに、「ダイナミックな範囲にあるIPなので、私のプロバイダのメールサーバーにメールをリレーするようにしてはいかが?」といっているようだ。
やっぱり面倒だなあ。

2009年1月11日日曜日

動的IPアドレスにURLを割り当てる

自宅の光通信は、安くすませるために、動的IPになってます。
で、dyndns.orgと家サーバープロジェクトを使って実験してます。
このとき、それぞれ、IPアドレスの更新用に、ddclient.shとddns-update.pl を使ってます。
昨日書いたように、この動的IPが引っかかっているわけです。

少し前までは、固定IP(ただし、ISDN)を使っていて気にも留めていませんでした。
プロバイダ等を変えると色々あるもんです(^_^;)

ダイナミックな範囲にあるメールサーバ

自宅で運用している動的IPメールサーバから、職場あてにメールが届かない。
職場は、トレンドマイクロでウィルスチェックしているからか?
で、こんなメールが返ってきた。
Thank you for writing to the MAPS Dynamic User List (DUL) Maintainers.

This email address is used to submit DUL listing requests, DUL removal
requests, and for other communication regarding the MAPS DUL.

The MAPS DUL is a list of known dynamic (including dial-up) end user
networks, and listings appear either due to junk e-mail complaints by
DUL subscribers or by the Internet provider's request.

It is NOT a list
of insecure or open relay mail servers, nor is it a list of networks we
consider friendly or neutral to spammers.

If you are blocked by a
DUL subscriber, they are not saying you are a spammer nor are they
saying your Internet provider is a spam problem.

[SPECIFIC ISP NOTES and END USER INFORMATION] (Read before proceeding)
Specific Internet providers may have special notes for their users being
blocked by DUL subscribers. You may read these notes on the End User
Information page:

http://www.mail-abuse.com/support/enduserinfo_dul.html

[REMOVALS]
If you want us to remove listings of former dynamic ranges or other
incorrect listings, we need to know the IP addresses listed. If you
already provided these to us, we will remove them once we verified
they are not used for dynamic end users, and you will receive
e-mail confirming their removal.

If you are asking us to remove a listing for a network range that is still
for dynamic end users, note that we will only remove such listings at
the request of the network's admins. We will not honor remove requests
from end users of a network. Contact your admins and ask them to write us.

NOTE: A removal may take some time to propagate out to subscribers.

めんどうなので、エキサイト翻訳して修正した。
MAPS Dynamic User List(DUL)維持装置に書き込んでいただき有り難うございます。

このEメールアドレスは、要求をリストアップするDUL、DUL取り外し要求を提出するために使用されて、MAPS DULに関する他のコミュニケーションのために使われています。

MAPS DULは一般的なダイナミックな(ダイヤルアップを含んでいる)エンドユーザネットワークのリスト、そして、リストはDUL加入者によるジャンクメール苦情、プロバイダの要求でリスとされています。

DULは不安定または、公開されているリレーメールサーバのリストでもなければ、スパマーにとって好餌な、または中立であると思われるネットワークのリストでもありません。

あなたがDUL加入者によってブロックされているなら、それらは、あなたがスパマーであるというわけでなく、
あなたのプロバイダがスパム問題であるわけでもありません。

SPECIFIC ISP NOTESとエンドユーザ情報(進行の前に読む)の特定のプロバイダには、
DUL加入者によって妨げられる彼らのユーザへの特記があるかもしれません。 あな
たはエンドユーザ情報ページでのこれらの注意を読むことができます:

http://www.mail-abuse.com/support/enduserinfo_dul.html

[取り外し]
あなたが、ダイナミックレンジや他の不正確なリストを取り外して欲しいなら、私たちは、IPアドレスが記載したのものを知る必要があります。

あなたが既にこれらを我々に提供するならば、私たちが一度それらを取り除くつ
もりである、そして、それらはダイナミックなエンドユーザに使用されないことを確かめ、あなたは、彼らの取り外したことの確認のメールを受け取るでしょう。


まだ、ダイナミックなエンドユーザのためのものであるネットワーク範囲にあるリストを取り外すように頼むのならば、
私たちがネットワークのアドミンの依頼でそのようなリストを取り外すだけであることに注意してください。 私たちは取り除くつもりです。ネットワークのエンドユーザからの要求では取り除きません。


アドミンに連絡してください、そして、連絡するように彼らに頼んでください。

以下に注意してください。 取り外しためにいくらかの時間がかかるかもしれません。

ISP参加と"BLACKHOLING"
あなたがMAPS DULに現れるあなたのダイナミックなエンドユーザ範囲に関するプロバイ
ダであるなら、DULがスパムソース・リストでないことを覚えていてください。 多くの
プロバイダが、より効果的に自己の利用規約を実施できるように進んでリストを私たち
に提供します。 あなたは、私たちと共に働いていることによって、あなたのネットワ
ークからのダイナミックなIPスパム事件を減少させることができます。



要するに、自宅で契約しているインターネットプロバイダを通して、頼んでくれ という事らしい。
面倒だから、止めた。

2009年1月7日水曜日

debian etchでのメールシステム

職場のメールサーバーは、postfix+courier pop+courier imapです。
自宅のサーバーは、以前は固定IPで運用してましたが、今は動的IPです。
でも、ドメインを家サーバプロジェクトとdyndnsからもらって運用しています。
で、以前はqmailだったんですが、今度は、簡単なpostfixを入れる練習です。
squirrelmailで、ウェブメールを構築します。
debianは楽ちんで、あっという間に終わります。

aptitude install postfix
設定を/etc/postfix/main.cfで。

aptitude install courier-pop courier-imap
設定は特になし。

aptitude install squirrelmail
設定は、/usr/sbin/squirrelmail-configureで、対話的に。

各設定のメモは後で書いておきます。

Installing default squirrelmail config.
Run /usr/sbin/squirrelmail-configure as root to configure/upgrade config.
と表示されるので、これを実行します。
#/usr/sbin/squirrelmail-configure

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 10

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : en_US
2. Default Charset : iso-8859-1
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 1

SquirrelMail attempts to set the language in many ways. If it
can not figure it out in another way, it will default to this
language. Please use the code for the desired language.

[en_US]: ja_JP


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : ja_JP
2. Default Charset : iso-8859-1
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 2

This option controls what character set is used when sending
mail and when sending HTML to the browser.

This option is used only when default language is 'en_US'.

[iso-8859-1]: iso-2022-jp

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : ja_JP
2. Default Charset : iso-2022-jp
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> r

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 2


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : trim(implode('', file('/etc/'.(file_exists('/etc/mailname')?' mail':'host').'name')))
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> a

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : trim(implode('', file('/etc/'.(file_exists('/etc/mailname')?' mail':'host').'name')))
2. Invert Time : false
3. Sendmail or SMTP : SMTP

IMAP Settings
--------------
4. IMAP Server : localhost
5. IMAP Port : 143
6. Authentication type : login
7. Secure IMAP (TLS) : false
8. Server software : other
9. Delimiter : detect

B. Update SMTP Settings : localhost:25
H. Hide IMAP Server Settings

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 8

Each IMAP server has its own quirks. As much as we tried to stick
to standards, it doesn't help much if the IMAP server doesn't follow
the same principles. We have made some work-arounds for some of
these servers. If you would like to use them, please select your
IMAP server. If you do not wish to use these work-arounds, you can
set this to "other", and none will be used.
cyrus = Cyrus IMAP server
uw = University of Washington's IMAP server
exchange = Microsoft Exchange IMAP server
courier = Courier IMAP server
macosx = Mac OS X Mailserver
hmailserver = hMailServer
other = Not one of the above servers
[other]: courier

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : trim(implode('', file('/etc/'.(file_exists('/etc/mailname')?' mail':'host').'name')))
2. Invert Time : false
3. Sendmail or SMTP : SMTP

IMAP Settings
--------------
4. IMAP Server : localhost
5. IMAP Port : 143
6. Authentication type : login
7. Secure IMAP (TLS) : false
8. Server software : courier
9. Delimiter : detect

B. Update SMTP Settings : localhost:25
H. Hide IMAP Server Settings

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> r

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> s

Data saved in config.php
Press enter to continue...

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> q


Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!

とでるので、configtest.php を実行して、
Congratulations, your SquirrelMail setup looks fine to me!
が出て、アパッチの設定をします。

Alias /squirrelmail /usr/share/squirrelmail

php_flag register_globals off
Options Indexes FollowSymLinks

DirectoryIndex index.php



で、今度はこのウェブメールにログインして、リスの絵がでてOK!