免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1201 | 回复: 0
打印 上一主题 下一主题

mydns的安装和配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-27 10:10 |只看该作者 |倒序浏览
1. 进入源码包编印安装
cd /srv/
tar zvxf mydns-1.1.0.tar.gz
cd mydns-1.1.0
./configure --prefix=/usr/local/mydns
make
make install
2. 运行make conf 生成主配置文件
make conf
3. 添加运行mydns 的用户
useradd mydns
4. 编辑主配置文件
vi /etc/mydns.conf(文件内容见附件)
5. 登陆数据库创建库和授权用户
mysql -p123456
create database mydns;
grant all on mydns.* to mydns@localhost identified by '123456';
flush privileges;
quit
6. 就如安装目录初始化数据库
cd /usr/local/mydns/sbin/
./mydns --create-tables | mysql -u mydns -p -D mydns
7. 修改soa 表(后加的)
mysql -u mydns -p123456 -D mydns
alter table soa add column active enum('y','n') not null;
alter table soa add index (active);
alter table soa add column xfer char(255) not null;
8. 创建启动脚本
vi /etc/init.d/mydns(脚本内容见附件,优先级要比MySQL 低,叫起在MySQL
之后启动)
chmod +x /etc/init.d/mydns
9. 用 chkconfig 管理
chkconfig --add mydns
chkconfig --levels 235 mydns on
10.启动mydns 服务
/etc/init.d/mydns start
11.查看是否启动,看53 端口有没有激活
lsof -i :53
netstat -na |grep udp
12 导入测试数据进行测试(test.sql 见附件)
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/100752/showart_2079370.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP