Installing MyDNS And The MyDNSConfig Control Panel On CentOS 5.1 > 리눅스 Tip

본문 바로가기
 

Installing MyDNS And The MyDNSConfig Control Panel On CentOS 5.1

페이지 정보

작성자 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 19,033회 작성일 08-05-29 00:22

본문

Installing MyDNS And The MyDNSConfig Control Panel On CentOS 5.1

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 12/10/2007

In this tutorial I will describe how to install and configure MyDNS and MyDNSConfig on CentOS 5.1. MyDNS is a DNS server that uses a MySQL database as backend instead of configuration files like, for example, Bind or djbdns. The advantage is that MyDNS simply reads the records from the database, and it does not have to be restarted/reloaded when DNS records change or zones are created/edited/deleted. A secondary nameserver can be easily set up by installing a second instance of MyDNS that accesses the same database or, to be more redundant, uses the MySQL master / slave replication features to replicate the data to the secondary nameserver.

 

MyDNSConfig is an easy to use web-based interface to MyDNS. MyDNSConfig can create all types of DNS records that are available in MyDNS and adds features like user management and access privileges.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

 

2 Installing The Prerequisites

First we enable the RPMforge repository on our CentOS system as some of the packages that we are going to install in the course of this tutorial are not available in the official CentOS 5.1 repositories:

rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

MyDNSConfig is a web-based interface to MyDNS written in PHP. This requires a webserver with PHP enabled and the MySQL database server. If you have already Apache, PHP and MySQL installed, you may skip this step. We also install phpMyAdmin here so that you have a web interface to the MySQL database in case you need it:

yum install httpd mysql-server php php-mysql php-mbstring phpmyadmin

Start MySQL:

chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Then set passwords for the MySQL root account:

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):

vi /etc/httpd/conf.d/phpmyadmin.conf

#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Next we change the authentication in phpMyAdmin from cookie to http:

vi /usr/share/phpmyadmin/config.inc.php

[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

Then we create the system startup links for Apache and start it:

chkconfig --levels 235 httpd on
/etc/init.d/httpd start

Now you can direct your browser to http://server1.example.com/phpmyadmin/ or http://192.168.0.100/phpmyadmin/ and log in with the user name root and your new root MySQL password.

 

3 Installing MyDNSConfig

Log in to 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;

Replace the word mydnspassword in the above commands with a password of your choice.

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/html/mydnsconfig

Install the MyDNSConfig MySQL Database:

mysql -u root -p mydns < install/mydnsconfig.sql

The command above asks for a password, please enter the password of the MySQL root user.

Edit the MyDNSConfig configuration; please make sure you fill in the correct database settings:

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

<?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;
?>

Afterwards, remove the MyDNSConfig installer from the /tmp directory:

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

댓글목록

등록된 댓글이 없습니다.

Total 137건 1 페이지
리눅스 Tip 목록
번호 제목 글쓴이 조회 날짜
137 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21617 02-03
136 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21569 12-24
135 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21105 11-07
134 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21015 09-07
133 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20911 04-10
132 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20822 01-13
131 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20796 04-11
130 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20540 10-21
129 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20459 06-21
128 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19909 06-12
127 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19780 01-13
126 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19774 08-05
125 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19531 06-23
124 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19513 06-05
123 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19347 05-08
122 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19291 09-02
121 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19204 11-15
열람중 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19034 05-29
게시물 검색