Chinaunix首页 | 论坛 | 博客
  • 博客访问: 250785
  • 博文数量: 93
  • 博客积分: 3001
  • 博客等级: 中校
  • 技术积分: 1050
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-11 13:20
文章分类

全部博文(93)

文章存档

2011年(1)

2009年(92)

我的朋友

分类: LINUX

2009-10-27 10:10:25

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 见附件)
阅读(1171) | 评论(0) | 转发(0) |
0

上一篇:MySQL执行计划

下一篇:mynd启动脚本

给主人留下些什么吧!~~