注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天高云淡的博客

A bad beginning makes a bad ending.

 
 
 

日志

 
 

MyDNS 1.0.0 reference manual (1)  

2010-05-18 20:46:17|  分类: DNS |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

1. Introduction to MyDNS

MyDNS is an Internet domain name server. It is unique among DNSservers in that it was designed explicitly to work with anexternal SQL database.

At the moment, two popular open-source databases are supported:MySQL andPostgreSQL.

The primary goals of the MyDNS package are stability, security,interoperability, simplicity, and speed. But not necessarilyin that order.

This manual assumes that the reader has a workingunderstanding of basic DNS concepts and their SQL server.

2. Installation


2.1 Compiling the source

First, uncompress and unpack the distribution to a location of your choosing.The distribution will be extracted into a directory named `mydns-1.0.0'.

Change directory into the distribution directory, then run the configurescript to configure the package for your system.

The `INSTALL' file has full details on how the configure script works. Runconfigure --help to output a summary of all options.

You'll probably be able to simply run the configure command with no additional arguments.

 
$ ./configure

If you have both MySQL and PostgreSQL installed on your system, MyDNS chooses MySQL bydefault. To tell MyDNS to use PostgreSQL instead of MySQL, run configure --without-mysql.

After the configuration process is complete, build the package.

 
$ make

Then, if the build completed successfully, install the package.

 
# make install

The `mydns' binary should now be installed in the `sbin' dir beneaththe `prefix' provided to the configure script, if any.

By default, `mydns' is installed as `/usr/local/sbin/mydns'.

2.2 Creating the database

Now that you have installed MyDNS, you'll need to set up a database and access permissions.

To create a database called `mydns' on your database server:

MySQL:

 
$ mysqladmin -h host -u username -p create mydns

PostgreSQL:
 
$ createdb mydns

2.3 Creating the tables

Next, create the tables in your database that will hold the DNS data.

Running mydns --create-tables will cause MyDNS to outputCREATE TABLE statements appropriate for your database.

MySQL:

 
$ mydns --create-tables | mysql -h host -u username -p mydns

PostgreSQL:

 
$ mydns --create-tables | psql mydns

After you have created the tables, you should have two tables in your`mydns' database, called `soa' (see section 3.1 The `soa' table) and`rr' (see section 3.2 The `rr' table).

2.4 Database access

Next, create a user that the MyDNS server can use to access the `mydns' database:

MySQL:

 
$ mysql -h host -u username -p mydns
mysql> GRANT SELECT ON mydns.* TO user@localhost IDENTIFIED BY 'password';

PostgreSQL:
$ psql mydns
mydns=# CREATE USER user WITH PASSWORD 'password';
mydns=# GRANT SELECT ON soa,soa_id_seq TO user;
mydns=# GRANT SELECT ON rr,rr_id_seq TO user;

2.5 Creating `mydns.conf'

MyDNS probably won't start properly if it can't find its configuration file. By default,the configuration file is called `/etc/mydns.conf'.

Running mydns --dump-config will output a set of configurationoptions suitable for using as your configuration file. See section B. Configuration.

So, for a fresh installation, this command will create your initial configurationfile:

 
# mydns --dump-config > /etc/mydns.conf

You should now edit your `mydns.conf' file. Most defaults should be fine for most sites.

The values you are most likely to want to modify are the values for `db-host' and `db-user',which should contain the database username and password that you created at the end of step 2.4.(See section 2.4 Database access).



  评论这张
 
阅读(652)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018