mydns setup メモ

このエントリーをはてなブックマークに追加
はてなブックマーク - mydns setup メモ
Share on Facebook
Post to Google Buzz
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Share on FriendFeed

Install MyDNSConfig
===================

You can download MyDNSConfig from http://www.mydnsconfig.org.

Login into mysql and create the database:

mysql -u root -p

CREATE DATABASE mydns;
GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO ‘mydns’@’localhost’ IDENTIFIED BY ‘mydnspassword’;
GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO ‘mydns’@’localhost.localdomain’ IDENTIFIED BY ‘mydnspassword’;
FLUSH PRIVILEGES;
quit;

Download MyDNSConfig:

cd /tmp
wget http://mesh.dl.sourceforge.net/sourceforge/mydnsconfig/MyDNSConfig-1.1.0.tar.gz
tar xvfz MyDNSConfig-1.1.0.tar.gz
cd MyDNSConfig-1.1.0

Install MyDNSConfig:

mkdir /usr/share/mydnsconfig
cp -rf interface/* /usr/share/mydnsconfig/
ln -s /usr/share/mydnsconfig/web/ /var/www/mydnsconfig

Installing MyDNSConfig SQL Database:

mysql -u root -p mydns < install/mydnsconfig.sql
Edit The MyDNSConfig configuration

vi /usr/share/mydnsconfig/lib/config.inc.php

The file should look like this:

———————————————————————————–

<?php
/*
Copyright (c) 2005, Till Brehm, Falko Timme, projektfarm Gmbh
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

ini_set(‘register_globals’,0);

$conf[“app_title”] = “MyDNSConfig”;
$conf[“app_version”] = “1.1.0”;
$conf[“rootpath”]   = “/usr/share/mydnsconfig”;
$conf[“fs_div”]    = “/”; // File system divider, \\ on windows and / on linux and unix
$conf[“classpath”]   = $conf[“rootpath”].$conf[“fs_div”].”lib”.$conf[“fs_div”].”classes”;
$conf[“temppath”]   = $conf[“rootpath”].$conf[“fs_div”].”temp”;
/*
        Database Settings
*/

$conf[“db_type”]  = ‘mysql’;
$conf[“db_host”]  = ‘localhost’;
$conf[“db_database”]  = ‘mydns’;
$conf[“db_user”]  = ‘mydns’;
$conf[“db_password”]  = ‘mydnspassword’;
/*
        External programs
*/

$conf[“programs”][“wput”] = $conf[“rootpath”].”/tools/wput/wput”;
/*
        Themes
*/

$conf[“theme”]   = ‘grey’;
$conf[“html_content_encoding”] = ‘text/html; charset=iso-8859-1’;
$conf[“logo”]    = ‘themes/default/images/mydnsconfig_logo.gif’;

/*
        Default Language
*/

$conf[“language”]                = ‘en’;
/*
        Auto Load Modules
*/

$conf[“start_db”]    = true;
$conf[“start_session”] = true;

/*
        DNS Settings
*/

$conf[“auto_create_ptr”] = 1; // Automatically create PTR records?
$conf[“default_ns”] = ‘ns1.example.com.’; // must be set if $conf[‘auto_create_ptr’] is 1. Don’t forget the trailing dot!
$conf[“default_mbox”] = ‘admin.example.com.’; // Admin email address. Must be set if $conf[‘auto_create_ptr’] is 1. Replace “@” with “.”. Don’t forget the trailing dot!
$conf[“default_ttl”] = 86400;
$conf[“default_refresh”] = 28800;
$conf[“default_retry”] = 7200;
$conf[“default_expire”] = 604800;
$conf[“default_minimum_ttl”] = 86400;

?>

———————————————————————————–

Make sure you fill in the correct database details! If you want MyDNSConfig to automatically create reverse DNS records (PTR records) when you create a new DNS records, then set $conf[‘auto_create_ptr’] to 1 and specify a default name server in $conf[‘default_ns’] (do not forget the dot at the end!) and an admin email address in $conf[‘default_mbox’] (also with a dot at the end, and the @ sign must be replaced by a dot!).
Removing the installer from /tmp

rm -rf MyDNSConfig-1.1.0/
rm -f MyDNSConfig-1.1.0.tar.gz

Now install mydns and edit the file/etc/mydns.conf to use the same database that we created above for MyDNSConfig. The daatabase contains all tables needed for MyDNS.

—————————–
Now you can access MyDNSConfig under http://<your_ip_address>/mydnsconfig/. The default login username is admin, the password is also admin. Please change the password after your first login under System -> Edit user.

Back To Top