Tuesday, April 16, 2013

Install PDNS in debian

Here I will explain how to install pdns in linux debian.
apt-get update
apt-get install gcc g++ make libncurses5-dev
Mysql Installation:
groupadd mysql
useradd -g mysql -d  /var/mysql  -m mysql
tar –xvzf  mysql-5.1.62.tar.gz
cd  mysql-5.1.62
./configure –prefix=/usr/local –localstatedir=/var/mysql/data –with-charset=latin1 /
–with-extra-charsets=none –with-tcp-port=3306 –enable-assembler –without-debug /
–with-unix-socket-path=/tmp/mysql/unix.sock–enable-static –with-mysqld-user=mysql \
–enable-thread-safe-client –enable-shared –with -plugins=partition,innobase
make && make install


PDNS Installation:
apt-get install libboost-program-options-dev liblua5.1-0-dev libboost-dev libboost-serialization-dev
tar -xvzf pdns-3.1.tar.gz
cd pdns-3.1
./configure –with-modules=gmysql –enable-pdns_server –enable-recursor –with-mysql=/usr/local
make && make install
cp pdns/pdns /etc/init.d/pdns
chmod +x /etc/init.d/pdns
Web Server Installation:
apt-get install libssl-dev
tar –xvzf  httpd-2.2.22.tar.gz
cd  httpd-2.2.22
./configure –prefix=/var/www –exec-prefix=/usr/local –sysconfdir=/etc/httpd/conf \
–enable-http –enable-cgi –with-ssl –enable-so –enable-ssl –disable-index \
–disable-action –enable-alias
make && make install
PHP:
 apt-get install libxml2-dev libjpeg-dev libpng12-dev libmcrypt-dev
tar –xvzf php- 5.4.3.tar.gz
cd php- 5.4.3
./configure –prefix=/usr –with-apxs2=/usr/local/bin/apxs –with-config-file-path=/etc –with-openssl
–with-pear –with-zlib=/usr –enable-bcmath –enable-ftp –with-gd –with-jpeg-dir=/usr –enable-gd-native-ttf
–with-png-dir=/usr –with-gettext –with-mysql –with-mysql-sock=/var/tmp/unix.sock –with-mcrypt
–sysconfdir=/etc
make && make install
AddType application/x-httpd-php .php
cp php.ini-production /etc/php.ini
Change below settings in php.ini
 max_execution_time=60
upload_max_filesize=8M
error_log=/var/www/logs/php_error_log
stating pdns
pdns_server
pdns_recursor — > recursor
vim /etc/httpd/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@test.com
DocumentRoot “/var/www/htdocs/poweradmin”
DirectoryIndex index.php
ServerName your-domain-name
ErrorLog “logs/test-error_log”
CustomLog “logs/test-access_log” common
</VirtualHost>
tar -zxvf poweradmin-2.1.6.tgz
mv poweradmin-2.1.6 /var/www/htdocs/poweradmin
follow the procedures ..
vim /var/www/htdocs/poweradminconfig.inc.php  for modifications
vim /etc/pdns.conf
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=power
gmysql-password=power.pass
gmysql-dbname=powerdns
For Recursion
allow-recursion=111.111.111.0/22, 222.222.222.0/24
lazy-recursion=yes
recursor=127.0.0.1

No comments:

Post a Comment