noip2 ( no-ip.com ) アップデートの豆情報

Last update: January 5, 2008 JST

RedHatLinux 8.0 & noip_updater_v1.6 & フレッツADSL 環境下での noip-2.0.12 アップデート(インストール)編。
固定 IP が無い私のホームサーバでは、フリーの DynamicDNS サイト no-ip.com を利用しています。
今まで利用していた noip_updater_v1.6 を noip-2.0.12 にアップデートした時の記録です。

必要ファイル。 次のリンク先ページにある Download 2.0.12 をクリックするとゲット出来ます。

noip-2.0.12.tar.gz


すでに、http://www.no-ip.com/ で申し込みとパスワードをメールで受け取ったものとして、話を進めます。

難しい事ではありません、英語のわからない私も出来ました。 まだ、No-IP.com のユーザーでない方は、 です。


以降はインターネットに繋げたままで作業をしています。
さて、古い noipを削除します。(あなたの環境では不要又は足りない項目があるでしょう。)

[root@kathy akihito]# ps ax | grep noip
1133 ? S 0:00 /usr/local/bin/noip 1797 pts/1 S 0:00 grep noip
[root@kathy akihito]# kill 1133
[root@kathy akihito]# rm -f /usr/local/bin/noip
[root@kathy akihito]# rm -f /usr/local/lib/no-ip.conf
[root@kathy akihito]# rm -f /etc/rc.d/init.d/noip
[root@kathy akihito]# rm -f /etc/rc.d/rc3.d/S98noip


では、ゲットしたファイルを解凍してインストール!

[akihito@kathy src]$ tar zxvf noip-2.0.12.tar.gz
noip-2.0.12/ noip-2.0.12/COPYING noip-2.0.12/Makefile noip-2.0.12/README.FIRST noip-2.0.12/binaries/ noip-2.0.12/binaries/noip2-Linux noip-2.0.12/noip2.c noip-2.0.12/redhat.noip.sh
[akihito@kathy src]$ cd noip-2.0.12/
[akihito@kathy noip-2.0.12]$ make
gcc -Wall -g -O2 -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2
[akihito@kathy noip-2.0.12]$ su
Password: ******
[root@kathy noip-2.0.12]# make install
if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi cp noip2 /usr/local/bin/noip2 /usr/local/bin/noip2 -C -Y -c /tmp/no-ip2.conf Auto configuration for Linux client of no-ip.com. Multiple network devices have been detected. Please select the Internet interface from this list. By typing the number associated with it. 0 eth0 1 eth1 2 eth2 3 eth3 4 eth4 5 ppp0 5 Please enter the login/email string for no-ip.com xxxxxx@xxxx.ocn.ne.jp Please enter the password for user 'xxxxxx@xxxx.ocn.ne.jp' ****** Only one host [kogure.no-ip.com] is registered to this account. It will be used. Do you wish to run something at successful update?[N] (y/N) N New configuration file '/tmp/no-ip2.conf' created. mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf


上記作業で作られたファイルを手直し。

[root@kathy noip-2.0.12]# chmod 700 /usr/local/bin/noip2
[root@kathy noip-2.0.12]# ls -l /usr/local/bin/noip2
-rwx------ 1 root root 82150 Jul 13 02:53 /usr/local/bin/noip2
[root@kathy noip-2.0.12]# vi redhat.noip.sh
stop() { if [ -f /var/run/noipd.pid ] ; then echo -n $"Stopping no-ip client daemon: " killproc noip2 -TERM echo RETVAL=$? rm -f /var/run/noipd.pid else echo "no-ip client daemon is not running" && exit 0 fi return $RETVAL }
[root@kathy noip-2.0.12]# cp redhat.noip.sh /etc/rc.d/init.d/noipd
[root@kathy noip-2.0.12]# chmod +x /etc/rc.d/init.d/noipd
[root@kathy noip-2.0.12]# /sbin/chkconfig --add noipd
[root@kathy noip-2.0.12]# /sbin/chkconfig --list noipd
noipd 0:off 1:off 2:off 3:on 4:on 5:on 6:off


以上で noip2をデーモンとして便利に使えるようになりました。 自動更新間隔を30分に変更し作動確認をしてみます。

[root@kathy noip-2.0.12]# /etc/rc.d/init.d/noipd start
Starting no-ip client daemon: [ OK ] 自動更新間隔を30分に変更
[root@kathy noip-2.0.12]# /usr/local/bin/noip2 -U 30
Process 2185 - update interval changed to 30. Configuration data '/usr/local/etc/no-ip2.conf' updated 作動確認
[root@kathy noip-2.0.12]# /usr/local/bin/noip2 -S
1 noip2 process active. Process 2185, started as noip2 Using configuration from /usr/local/etc/no-ip2.conf Last IP Address set xxx.xxx.xxx.xxx Account xxxxxx@xxxx.ocn.ne.jp configured for: host kogure.no-ip.com Address check every 30 minutes, directly connected via /dev/ppp0.
[root@kathy noip-2.0.12]# cat /var/log/messages | grep noip
Jul 13 03:00:27 kathy noip2[2185]: v2.0.12 daemon started Jul 13 03:00:27 kathy noip2[2185]: kogure.no-ip.com was already set to xxx.xxx.xxx.xxx. Jul 13 03:00:27 kathy noipd: noip2 startup succeeded
[root@kathy noip-2.0.12]# nslookup kogure.no-ip.com
Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing. Server: 192.168.1.100 Address: 192.168.1.100#53 Non-authoritative answer: Name: kogure.no-ip.com Address: xxx.xxx.xxx.xxx


便利なコマンドオプションがあるので使ってみましょう。

[root@kathy noip-2.0.12]# /usr/local/bin/noip2 -h
USAGE: noip2 [ -C [ -F][ -Y][ -U #min]][ -c file] [ -d][ -D pid][ -i addr][ -S][ -M][ -h] Version Linux-2.0.12 Options: -C create configuration data -F force NAT off -Y select all hosts/groups -U minutes set update interval -c config_file use alternate data path -d increase debug verbosity -D processID toggle debug flag for PID -i IPaddress use supplied address -I interface use supplied interface -S show configuration data -M permit multiple instances -K processID terminate instance PID -h help (this text)


では、オプション C の使い方。
http://www.no-ip.com/ で E-Mail やパスワードを変更した場合に必要なクライアント側の E-Mail とパスワードの変更方法です。

先に noip2 を止めます。
[root@kathy akihito]# /etc/rc.d/init.d/noipd stop
Stopping no-ip client daemon: [ OK ]
[root@kathy akihito]# /usr/local/bin/noip2 -C
Auto configuration for Linux client of no-ip.com. Multiple network devices have been detected. Please select the Internet interface from this list. By typing the number associated with it. 0 eth0 1 eth1 2 eth2 3 eth3 4 eth4 5 ppp0 5 Please enter the login/email string for no-ip.com xxxxxx@xxxx.xxx.ne.jp Please enter the password for user 'xxxxxx@xxxx.xxx.ne.jp' ****** Only one host [kogure.no-ip.com] is registered to this account. It will be used. Do you wish to run something at successful update?[N] (y/N) N New configuration file '/usr/local/etc/no-ip2.conf' created.
[root@kathy akihito]# /etc/rc.d/init.d/noipd start
Starting no-ip client daemon: [ OK ]


home  ご感想は Kogure Akihito へ。 back top next