Centos 5.4 安装mydns

     Centos 5.4 安装Mydns
1.需要安装的包
httpd-devel-2.2.3-6.el5.centos.1
httpd-2.2.3-6.el5.centos.1
perl-DBD-MySQL-3.0007-1.fc6
mysql-5.0.22-2.1
php-mysql-5.1.6-12.el5
mysql-server-5.0.22-2.1
mysql-devel-5.0.22-2.1
php-common-5.1.6-12.el5
php-mbstring-5.1.6-12.el5
php-5.1.6-12.el5
php-pdo-5.1.6-12.el5
php-mysql-5.1.6-12.el5
php-cli-5.1.6-12.el5
2. 搭建好LAMP 环境,把apache和mysql 设置成开机启动。
   chkconfig httpd on
   chkconfig mysqld on
3.给mysql 设置密码:root123
 mysqladmin -u root password “root123”
4.创建mydns数据库,并给他权限:
CREATE DATABASE mydns;                    
建立mydns数据库
GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO ‘mydns‘@‘localhost‘ IDENTIFIED BY ‘mydnspassword‘;           
建立mydns账号及密码,仅供本机登入
GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO ‘mydns‘@‘localhost.localdomain‘ IDENTIFIED BY ‘mydnspassword‘;      
建立mydns账号及密码,可由外登入
FLUSH PRIVILEGES;
quit;
5.安装管理mysqladmin的工具,phpMyAdmin-2.11.10-all-languages
  tar zxvf phpMyAdmin-2.11.10-all-languages.tar.gz
  mv phpMyAdmin-2.11.10-all-languages phpMyAdmin
  cp  cp config.sample.inc.php config.inc.php
 修改config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
 $cfg['Servers'][$i]['controluser'] = 'root';   /////mysql的用户名
 $cfg['Servers'][$i]['controlpass'] = 'root123';     ///////mysql的密码
/* Advanced phpMyAdmin features */
 $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
 $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
 $cfg['Servers'][$i]['relation'] = 'pma_relation';
 $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
 $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
 $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
 $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
 $cfg['Servers'][$i]['history'] = 'pma_history';
 $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/*
 * End of servers configuration
 */
/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
 ######################phpMyAdmin的测试地址: http://localhost/phpMyAdmin
6.安装mydnsconfig
  #tar xvfz MyDNSConfig-1.1.0.tar.gz
#cd MyDNSConfig-1.1.0
安装 MyDNSConfig:
  mkdir /usr/share/mydnsconfig
  cp -rf interface/* /usr/share/html/mydnsconfig/
  ln -s /usr/share/mydnsconfig/web/ /var/www/html/mydnsconfig
把mydnsconfig.sql 导入创建的mydns 数据库
  mysql -u root -p mydns < mydnsconfig.sql
编辑 MyDNSConfig 设定档
vi /usr/share/mydnsconfig/lib/config.inc.php
$conf["db_type"]                = 'mysql';
$conf["db_host"]                = 'localhost';
$conf["db_database"]            = 'mydns';
$conf["db_user"]                = 'root';
$conf["db_password"]            = 'root123';
7.安装mydns 以及设置
 wget http://downloads.sourceforge.net/project/mydns-ng/mydns/1.2.8.27/mydns-1.2.8.27.tar.gz?use_mirror=nchc
 tar zxvf mydns-1.2.8.27.tar.gz
 cd  mydns-1.2.8
 ./configure --prefix=/usr/local/mydns/
  make && make install
  生成mydns配置文件
 make conf
vi /etc/mydns.conf
需要修改的�目如下
db-host
db-user
db-password
servers = CPUS * 2 + 1
allow-axfr = yes
allow-update = yes
notify-enabled = yes
启动mydns 。。。
ln -s /usr/local/mydns/sbin/mydns /etc/init.d/
/usr/local/mydns/sbin/mydns --background
 ./mydns start
  查看udp 启动没有
[root@sino-b init.d]# netstat -an  | grep udp
udp        0      0 0.0.0.0:669                 0.0.0.0:*
udp        0      0 0.0.0.0:672                 0.0.0.0:*
udp        0      0 192.168.1.55:53             0.0.0.0:*  (启动了)
udp        0      0 127.0.0.1:53                0.0.0.0:*   (启动了)
udp        0      0 192.168.122.1:53            0.0.0.0:*
udp        0      0 0.0.0.0:67                  0.0.0.0:*
udp        0      0 0.0.0.0:46153               0.0.0.0:*
udp        0      0 0.0.0.0:5353                0.0.0.0:*
udp        0      0 0.0.0.0:111                 0.0.0.0:*
udp        0      0 0.0.0.0:631                 0.0.0.0:*
udp        0      0 :::44557                    :::*
udp        0      0 ::1:53                      :::*
udp        0      0 :::5353                     :::*

 

你可能感兴趣的:(centos,centos,职场,休闲,5.4,安装mydns)