Install MyDNS-NG & MyDNSConfig pada Debian Lenny
Tutorial kali ini membahas tentang management DNS Server yang ditangani via web tanpa harus melakukan remote server.
DNS Server ini menggunakan database Mysql sehingga mudah dalam penanganannya.
Installing MySQL
Kita dapat menginstall dengan cara sebagai berikut :
#aptitude install mysql-client mysql-server
kemudian akan ada beberapa pertanyaan sbb:
New password for the MySQL “root” user: <– password root mysql
Repeat password for the MySQL “root” user: <– password root mysql
Installing Apache2, PHP, phpMyAdmin
Kemudian kita install apache, php, phpmyadmin dengan sintak sebagai berikut :
#aptitude install apache2 apache2.2-common apache2-doc
apache2-mpm-prefork apache2-utils libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick vlogger
Kemuadian akan muncul pertanyaan sbb:
Web server to reconfigure automatically: <– apache2
Aktifkan module apache dengan sintak :
a2enmod suexec rewrite ssl actions include
Hapus file /etc/phpmyadmin/htpasswd.setup :
rm -f /etc/phpmyadmin/htpasswd.setup
Sesuaikan file configurasi apache sbb:
vi /etc/phpmyadmin/apache.conf
[...]
# # Authorize for setup
# <Files setup.php>
# # For Apache 1.3 and 2.0
# <IfModule mod_auth.c>
# AuthType Basic
# AuthName “phpMyAdmin Setup”
# AuthUserFile /etc/phpmyadmin/htpasswd.setup
# </IfModule>
# # For Apache 2.2
# <IfModule mod_authn_file.c>
# AuthType Basic
# AuthName “phpMyAdmin Setup”
# AuthUserFile /etc/phpmyadmin/htpasswd.setup
# </IfModule>
# Require valid-user
# </Files>
[...]
Kamu dapat mengakses dengan memanggil http://www.karai-aceh.com /phpmyadmin/
Installing MyDNS
Sebelum menginstal My DNS kita harus menginstall terlebihdahulu beberapa file dengan menggunakan perintah :
aptitude install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
Karena MyDNS tidak ada dalam Debian Lenny repositories, maka kita harus membuildnya terlebih dahulu :
cd /tmp
wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.27.tar.gz
tar xvfz mydns-1.2.8.27.tar.gz
cd mydns-1.2.8
./configure
make
make install
Kemudian kita buat file start/stop nya
vi /etc/init.d/mydns
Isi nya sbb:
#! /bin/sh
#
# mydns Start the MyDNS server
#
# Author: Philipp Kern <phil@philkern.de>.
# Based upon skeleton 1.9.4 by Miquel van Smoorenburg
# <miquels@cistron.nl> and Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/mydns
NAME=mydns
DESC=”DNS server”
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
case “$1″ in
start)
echo -n “Starting $DESC: $NAME”
start-stop-daemon –start –quiet \
–exec $DAEMON — -b
echo “.”
;;
stop)
echo -n “Stopping $DESC: $NAME”
start-stop-daemon –stop –oknodo –quiet \
–exec $DAEMON
echo “.”
;;
reload|force-reload)
echo -n “Reloading $DESC configuration…”
start-stop-daemon –stop –signal HUP –quiet \
–exec $DAEMON
echo “done.”
;;
restart)
echo -n “Restarting $DESC: $NAME”
start-stop-daemon –stop –quiet –oknodo \
–exec $DAEMON
sleep 1
start-stop-daemon –start –quiet \
–exec $DAEMON — -b
echo “.”
;;
*)
echo “Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}”
>&2
exit 1
;;
esac
exit 0
Kemudian kita buat agar script tersebut jalan pada waktu startup
chmod +x /etc/init.d/mydns
update-rc.d mydns defaults
Installing MyDNSConfig 3
Kita juga harus membuildnya terlebih dahulu dengan perintah :
cd /tmp
wget http://downloads.sourceforge.net/mydnsconfig/MyDNSConfig-3.0.1.tar.gz?use_mirror=
tar xvfz MyDNSConfig-3.0.1.tar.gz
cd mydnsconfig/install/
php -q install.php
Kemudian akan ada konfirmasi untuk installasi sbb:
——————————————————————————–
__ __ _____ _ _ _____ _____ __ _
| \/ | | __ \| \ | |/ ____|/ ____| / _(_)
| \ / |_ _| | | | \| | (___ | | ___ _ __ | |_ _ __ _
| |\/| | | | | | | | . ` |\___ \| | / _ \| ‘_ \| _| |/ _` |
| | | | |_| | |__| | |\ |____) | |___| (_) | | | | | | | (_| |
|_| |_|\__, |_____/|_| \_|_____/ \_____\___/|_| |_|_| |_|\__, |
__/ | __/ |
|___/ |___/
——————————————————————————–
>> Initial configuration
Operating System: Debian Lenny/Sid or compatible
Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with <ENTER>.
Tap in “quit” (without the quotes) to stop the installer.
Select language (en,de) [en]: <– ENTER
Installation mode (standard,expert) [standard]: <– ENTER
Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.example.com]:
<– ENTER
MySQL server hostname [localhost]: <– ENTER
MySQL root username [root]: <– ENTER
MySQL root password []: <– yourrootsqlpassword
MySQL database to create [dbmydnsconfig]: <– ENTER
MySQL charset [utf8]: <– ENTER
Configuring MyDNS
Configuring Apache
Configuring Firewall
Installing MyDNSConfig
MyDNSConfig Port [8080]: <– ENTER
Installing Crontab
no crontab for root
Restarting services …
Restarting web server: apache2 … waiting .
Installation completed.
Kamu dapat mengakses dengan memanggil http://www.karai-aceh.com:8080
User :admin
password :admin
by Karaiaceh



Info yang menarik.