下載
https://www.noip.com/client/linux/noip-duc-linux.tar.gz
編譯安裝
tar xf noip-duc-linux.tar.gz
cd noip-2.1.9-1
sudo make install
然後輸入mail, 及密碼, 並選擇要更新的網域
重新設定
若要更改設定, 執行 sudo /usr/local/bin/noip2 -C
啟動
sudo /usr/local/bin/noip2
自動啟動noip2
若要自動啟動 noip2, 將啟動程式寫在 /etc/profile之中, 則需要登入後, 才會執行, 所以此法行不通. 解決方式如下
sudo vim /etc/systemd/system/noip2.service
[Unit] Description = noip2 daemon After = NetworkManager-wait-online.service network.target network-online.target dbus.service Wants = NetworkManager-wait-online.service network-online.target Requires = dbus.service [Service] ExecStart = /usr/local/bin/noip2 ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure [Install] WantedBy = multi-user.target
儲存後, 執行 sudo systemctl enable noip2. 此時就會在/etc/systemd/system/multi-user.target.wants之下建立連結, 下次開機後,不需登入即會自動執行
測試方法 : ps -aux|grep noip2
Greetings! Very useful advice within this article! It’s the little changes that will make the largest changes. Thanks a lot for sharing!|