RedHatLinux 8.0 & noip_updater_v1.6 & フレッツADSL 環境下での noip-2.0.12 アップデート(インストール)編。
先に noip2 を止めます。
固定 IP が無い私のホームサーバでは、フリーの DynamicDNS サイト no-ip.com を利用しています。
今まで利用していた noip_updater_v1.6 を noip-2.0.12 にアップデートした時の記録です。
必要ファイル。 次のリンク先ページにある Download 2.0.12 をクリックするとゲット出来ます。
すでに、http://www.no-ip.com/ で申し込みとパスワードをメールで受け取ったものとして、話を進めます。
以降はインターネットに繋げたままで作業をしています。
さて、古い noipを削除します。(あなたの環境では不要又は足りない項目があるでしょう。)
1133 ? S 0:00 /usr/local/bin/noip
1797 pts/1 S 0:00 grep noip
[root@kathy akihito]# ps ax | 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
では、ゲットしたファイルを解凍してインストール!
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]$ tar zxvf noip-2.0.12.tar.gz
[akihito@kathy src]$ cd noip-2.0.12/
gcc -Wall -g -O2 -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2
[akihito@kathy noip-2.0.12]$ make
Password: ******
[akihito@kathy noip-2.0.12]$ su
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
[root@kathy noip-2.0.12]# make install
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
-rwx------ 1 root root 82150 Jul 13 02:53 /usr/local/bin/noip2
[root@kathy noip-2.0.12]# ls -l /usr/local/bin/noip2
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]# vi redhat.noip.sh
[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
noipd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@kathy noip-2.0.12]# /sbin/chkconfig --list noipd
以上で noip2をデーモンとして便利に使えるようになりました。 自動更新間隔を30分に変更し作動確認をしてみます。
Starting no-ip client daemon: [ OK ]
自動更新間隔を30分に変更
[root@kathy noip-2.0.12]# /etc/rc.d/init.d/noipd start
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 -U 30
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]# /usr/local/bin/noip2 -S
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]# cat /var/log/messages | grep noip
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]# nslookup kogure.no-ip.com
便利なコマンドオプションがあるので使ってみましょう。
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)
[root@kathy noip-2.0.12]# /usr/local/bin/noip2 -h
では、オプション C の使い方。
http://www.no-ip.com/ で E-Mail やパスワードを変更した場合に必要なクライアント側の E-Mail とパスワードの変更方法です。
Stopping no-ip client daemon: [ OK ]
[root@kathy akihito]# /etc/rc.d/init.d/noipd stop
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
[root@kathy akihito]# /usr/local/bin/noip2 -C
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.
Starting no-ip client daemon: [ OK ]
[root@kathy akihito]# /etc/rc.d/init.d/noipd start
home
ご感想は Kogure Akihito へ。
back top next