导航

PowerDNS安装方法(tar包)

Posted on 2012-02-07 15:09  conjohn668  阅读(710)  评论(0)    收藏  举报

1.硬件和OS环境


1 centos 5
2 x86_64

 

2.准备powerdns

powerdns 3.0.1 pdns-3.0.1.tar.gz

 

3.安装powerdns

tar -zxvf pdns-3.0.1.tar.gz

./configure --with-boost=/root/boost_1_48_0 --with-lua --with-mysql=/usr/local/mysql/ --with-mysql-lib=/usr/local/mysql/lib/ --with-mysql-includes=/usr/local/mysql/include

过程中出错<1><2><3>

make 

 完毕

 

 

附1:安装遇到的问题

<1> configure: error: cannot find Boost headers version >= 103400

a.缺少boost-devel.x86_64

b.版本低,需>1.34

boost_1_48_0.tar.gz

installation http://www.boost.org/doc/libs/1_49_0_beta1/doc/html/bbv2/installation.html

安装时使用命令:./bjam install

安装完显示下列信息:

The following directory should be added to compiler include paths:
/root/boost_1_48_0
The following directory should be added to linker library paths:
/root/boost_1_48_0/stage/lib

 

配置pdns时指定boost安装目录

./configure --with-boost=/root/boost_1_48_0

<2> checking for LUA... configure: error: Package requirements (lua-5.1 >= 5.1) were not met:

lua-5.2.0.tar.gz

make linux

还是不行,提示下列方法:

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

export LUA_LIBS='/root/lua-5.2.0/src/liblua.a'
export LUA_CFLAGS='-I/root/lua-5.2.0/src/'


./configure -with-lua

不能使用5.2版本,会lua_open() not declare的错误

lua-5.1.4.tar.gz

export LUA_LIBS='/root/lua-5.1.4/src/liblua.a'
export LUA_CFLAGS='-I/root/lua-5.1.4/src/' 

<3> configure: error: Didn't find the mysql library dir in '/usr/local/mysql/lib/mysql /usr/local/lib/mysql /opt/mysql/lib/mysql /usr/lib/mysql /usr/lib64/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib /usr/lib /usr/sfw/lib/'

mysql-5.1.61-linux-x86_64-glibc23.tar.gz

有INSTALL说明

<4>

libtool: link: g++ -DSYSCONFDIR=\"/usr/local/etc\" -DLIBDIR=\"/usr/local/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind -pthread /root/lua-5.2.0/src/lua -Iext/polarssl/include -D_GNU_SOURCE -Wall -O2 -pthread -o pdns_control dynloader.o dynmessenger.o arguments.o logger.o statbag.o misc.o unix_utility.o qtype.o -L/usr/local/mysql/lib/ /usr/local/mysql/lib/libz.a -lcrypt -lnsl -lm -pthread
/root/lua-5.2.0/src/lua: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crt1.o:(.text+0x0): first defined here
/root/lua-5.2.0/src/lua: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crti.o:(.fini+0x0): first defined here
/root/lua-5.2.0/src/lua:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crt1.o:(.rodata.cst4+0x0): first defined here
/root/lua-5.2.0/src/lua: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crt1.o:(.data+0x0): first defined here
/root/lua-5.2.0/src/lua: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crti.o:(.init+0x0): first defined here
dynloader.o: In function `main':
dynloader.cc:(.text+0x210): multiple definition of `main'
/root/lua-5.2.0/src/lua:(.text+0x130): first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 272 in /root/lua-5.2.0/src/lua to 12553 in dynloader.o
collect2: ld returned 1 exit status