NO-IP  の subdomain

自分のサイトを立ち上げるためにドメインを、dhcp(似ているがdynamic dnsが正しい)とするのがよい。このサイトで以下の手続きで無料でで きる。

Step 1: Create an account

Step 2: Confirm your account

    we will send a confirmation email to the address you provided

Step 3: Login to your account

Step 4: Add a host or domain to your account

Step 5: Making your host dynamic

    Dynamic Update Client (DUC)を インストール。

Step 6: Configure your router

   
done using a router function called Port Forwarding

Step 7: Run your services



詳細duc(NO-IP com DynamicDNSサービス自動更新設定
1。ソースダウンロード
# cd /usr/local/src
# wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
        ver.2.1.9-1 であった。
2。展開
# tar xvzf noip-duc-linux.tar.gz
# cd noip-2.1.9-1
        (README.JAPANESEは読めない)
3。コンパイル
# make && make install
           (注)・ gccでsuggest をinstallしてないとエラーとなった。
                ・apache2 installしてあること。
設定
Auto configuration for linux client of no-ip.com
mail-address ......
password ..........
only one host [------] is registered to this account
Do you wishto have them all updated?  [N] (y/n) y
Please enter anupdate interval: [30] <enter>
Do you wish to run something at successful update?  [N] (y/n) N
Now configuration file '/tmp/no-ip2.conf' created
実行ファイルは/usr/lpcal/bin/noip2に
設定ファイルは/usr/loacl/etc/no-ip2.confに(バイナリなのでusr/local/bin/noip2 -Cで最初の手順と同じ事をする必要がある)
4。動作確認
# /ustr/local/bin/noip2 として実行すれば設定した感覚でIPアドレスの変更を監視して変更あらば書き換えてくれる。
実行結果は
# cat /var/log/syslog | grep -e 'noip2' で確認 したら 一旦止める。
# ps aux | grep noip
nobody 21242 0 0---- ./noip
# /usr/local/bin/noip2 -K 21242
Process 21242 terminated
5。自動起動設定
ソース展開ディレクトリにディストリビューション別の起動スクリプトあり。
# cp /usr/local/src/noip-2.1.9-1/debian.noip2.sh /etc/init.d/noip2
# chmod 755 /etc/init.d/noip2
# update-rc.d noip2 defaults
          出力     ->Adding system startup for /etc/init.d/noip2---
                  /etc/rc0.d/K20noip2 -> --/init.d/noip2
                  /etc/rc1.d/K20noip2 -> -- /init.d/noip2
                  /---

# /etc/init.d/noip2 start