ARM 编译 phddns

参考博文http://bluegemyf.blog.163.com/blog/static/11816340201310472751513/

1、安装必要的开发包
sudo apt-get  install yum gawk g++ automake1.11 autoconf2.64

2、下载phddns-2.0.2.16556.tar.gz到某一个目录

wget http://download.oray.com/peanuthull/phddns-2.0.5.19225.tar.gz

3、解压所有文件
tar zxvf phddns-2.0.5.19225.tar.gz

进入解压目录:
cd phddns-2.0.5.19225

4、编译

aclocal
autoconf
automake
./configure
make

错误1(系统时间在configure创建时间之前):

image

date --set="2014-09-2"

错误2(aclocal-1.9找不到):

image

解决:

vi Makefile

image

成功:

image

5、执行编译好的程序并配置(默认使用/etc/phlinux.conf
进入src目录,执行phddns:

cd src
./phddns

输入服务器地址,如无特殊情况可使用默认值

Enter server address(press ENTER use phlinux3.oray.net):

输入您的Oray帐号名称

Enter your Oray account:

对应的Oray帐号密码

Password:

选择帮定的网卡,如无特殊,默认即可

Network interface(s):

eth0:192.168.141.18

lo:127.0.0.1

Choose one(default eth0):

选择日志保存到哪个文件

Log to use(default /var/log/phddns.log):

保存配置文件,选择yes则直接保存到/etc/phlinux.conf,输入other可以指定文件

Save to configuration file (/etc/phlinux.conf)?(yes/no/other):

接下来程序将已交互模式开始运行

image

192.168.141.18

NIC bind success

OnStatusChanged okConnecting

OnStatusChanged okDomainListed

OnDomainRegistered skyvense22.gicp.net

OnStatusChanged okDomainsRegistered

UserType: 0

看到上面这些就表示登录成功,这个时候可以按ctrl+c先退出程序

image

6、将phddns拷贝到/usr/bin/目录

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

cd /usr/bin/

ln -s ~/phddns/phddns-2.0.5.19225/src/phddns phddns

7、以后台模式启动花生壳并检查运行情况

/usr/bin/phddns -c /etc/phlinux.conf –d

8、将花生壳加到系统启动时运行

vi /etc/rc.local

在文件的末尾加上一行:

/usr/bin/phddns -c /etc/phlinux.conf -d

花生壳日志保存路径为:

/var/log/phddns.log
查看日志的命令:

tail /var/log/phddns.log

原文地址:https://www.cnblogs.com/shenerguang/p/3951756.html