Mydns-ng + MySQL + mydnsconfig (Web Management)

Source: Internet
Author: User
Tags nameserver

Mydns-ng http://www.mydns-ng.com/

Mydnsconfig:mydnsconfig Homepage Download http://sourceforge.net/projects/mydnsconfig/files/mydnsconfig/


Environment: Centos6.7 (x64) + mydns-1.2.8.31 + mydnsconfig-3.0.1/mydnsconfig-1.1.0

Download the required packages to/USR/LOCAL/SRC


First, install lamp

Yum install-y php php-mysql gcc mysql mysql-server mysql-devel httpd httpd-devel php-mbstring mysql-connector-odbc

Chkconfig httpd on;

Chkconfig MySQL on;

Service mysqld Start

Set the MySQL root password

Mysql

mysql> use MySQL;

mysql> Update user Set Password=password (' mima_123456 ') where user= ' root ';

mysql> flush Privileges;

Mysql> quit


Second, installation Mydns

Cd/usr/local/src

TAR-ZXVF mydns-1.2.8.31.tar.gz

CD mydns-1.2.8.31

./configure--prefix=/usr/local/mydns--with-mysql-lib=/usr/lib64/mysql--with-zlib=/usr/lib64

Make Make install


#创建mydns启动脚本

Vi/etc/init.d/mydns

####

#! /bin/sh

# Mydns Start the Mydns server

# Author:falko Timme <>.

# chkconfig:-80 75

# Description:mydns


Set-e

Path=/usr/local/mydns/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Name=mydns

daemon=/usr/local/mydns/sbin/$NAME

desc= "Mydns Server"

Scriptname=/etc/init.d/$NAME

# Gracefully Exit If the package has been removed.

Test-x $DAEMON | | Exit 0

Case "$" in

Start

Echo-n "Starting $DESC: $NAME"

$DAEMON--background

echo "."

;;

Stop

echo "Stopping $DESC: $NAME."

Kill-9 ' pidof $NAME ' &>/dev/null

;;

Restart

echo "Restarting $DESC: $NAME."

$ Stop && Sleep 1

$ start

;;

*)

echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2

Exit 1

;;

Esac

Exit 0

####

chmod +x/etc/init.d/mydns

Cp/usr/local/src/mydns-1.2.8.31/mydns.conf/etc

Useradd-m-s/sbin/nologin Mydns Create an account that runs Mydns

Modifying the/etc/mydns.conf

user = Nobody ==> modified to user = Mydns

Group = Nogroup ==> modified to group = Mydns

Chkconfig Mydns on


Third, installation MyDNSConfig-3.0.1

TAR-ZXVF mydnsconfig-3.0.1.tar.gz

CD Mydnsconfig/install


Edit./lib/install.lib.php find the following paragraph

if (Stristr ($content, ' CentOS release 5.2 (Final) ')} {

$distname = ' CentOS ';

$distver = ' 5.2 ';

$distid = ' centos52 ';

$distbaseid = ' fedora ';

Swriteln ("Operating System:centos 5.2 or compatible\n");

}


Change to

if (Stristr ($content, ' CentOS release 6.7 (Final) ')} {

$distname = ' CentOS ';

$distver = ' 6.7 ';

$distid = ' centos52 '; # # here don't change

$distbaseid = ' fedora ';

Swriteln ("Operating system:centos 6.7 or compatible\n");

Do not change the installation will be error:

PHP notice:undefined variable:distver in/tmp/ispconfig3_install/install/lib/install.lib.php on line 135

PHP notice:undefined Variable:distid in/tmp/ispconfig3_install/install/lib/install.lib.php on line 135

PHP notice:undefined Variable:distbaseid in/tmp/ispconfig3_install/install/lib/install.lib.php on line 35

Linux distribution of Version not recognized.


Php-q install.php #执行安装脚本

##################################################

This would start the Mydnsconfig 3 installer:

server1:/tmp/mydnsconfig/install# Php-q install.php


--------------------------------------------------------------------------------

__  __       _____  _   _  _____  _____             __ _

|     \/  |  | __ \|           \ | |/ ____|/ ____| / _(_)

|  \  / |_   _| |  | | \| |     (___ | | ___  _ __ | |_ _  __ _

| |\/| | | | | | | | .    ` |\___ \| | / _ \|  ' _ \| _| |/ _` |

| | | | |_| | |__| | |\  |____) | |___| (_) | | | | | | | (_| |

|_| |_|\__, |_____/|_| \_|_____/ \_____\___/|_| |_|_| |_|\__, |

__/ | __/ |

|___/                                             |___/

--------------------------------------------------------------------------------


>> Initial Configuration

Operating System:debian Lenny/sid or compatible

Following'll is a few questions for primary configuration so be careful.

Default values is in [brackets] and can is accepted with <enter>.

Tap in ' Quit ' (without the quotes) to stop the installer.


Select language (En,de) [en]: <--ENTER

Installation mode (Standard,expert) [standard]: <--ENTER

Full qualified hostname (FQDN) of the server, eg Server1.domain.tld [server1.example.com]: <--ENTER

MySQL server hostname [localhost]: <--ENTER

MySQL root username [root]: <--ENTER

MySQL root Password []: <--Your rootsql password

MySQL database to create [Dbmydnsconfig]: <--ENTER

MySQL CharSet [UTF8]: <--ENTER

Configuring Mydns

Configuring Apache

Configuring Firewall

Installing Mydnsconfig

Mydnsconfig Port [8080]: <--ENTER

Installing Crontab

No crontab for Root

Restarting services ...

Restarting Web Server:apache2 ... waiting.

Installation completed.

server1:/tmp/mydnsconfig/install#

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterwards you can access Mydnsconfig 3 under http://server1.example.com:8080/or http://192.168.0.100:8080/. Log in with the username Admin and the password admin (your should change, the default password after your first login):


------------------------------------------------------------------------

You may end up with a hint that HTTP start failed

Modify the configuration file

#vim/etc/http/conf/httpd.conf

In the last three lines of the configuration file, note NAMESERVER *:80 and NAMESERVER *:443 two lines

(If you follow the above or fail, the last line is changed to Include/etc/httpd/conf/sites-enabled/*.vhost

Note: The above implementation

1, new Database dbmydnsconfig, and new MySQL account ispconfig, using complex password

2, new Apache site, directory/usr/local/ispconfig (/var/www/ispconfig soft link to/usr/local/ispconfig/interface/web)

3, modify the/etc/mydns.conf configuration to connect MySQL account number, password, library


Restart httpd, boot mydns ( note : soa-table = Dns_soa, rr-table = DNS_RR in/etc/mydns.conf configuration file)

http://ip:8080 Access

Login user name and password admin

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/75/45/wKiom1Y0NL6Sbr4kAAIyaLPwm-Q614.jpg "title=" 001. PNG "alt=" wkiom1y0nl6sbr4kaaiyalpwm-q614.jpg "/>



Iv. If you want to use MyDNSConfig-1.1.0 to do Web management, installation is similar


1. Create DATABASE and user

mysql> CREATE DATABASE Mydns;

Mysql> Grant all on mydns.* to [e-mail protected] identified by ' 123456 ';

mysql> flush Privileges;


Tar xvfz mydnsconfig-1.1.0.tar.gz-c/usr/loacl/src

cd/usr/local/src/mydnsconfig-1.1.0

Mkdir/usr/share/mydnsconfig

CP-RF interface/*/usr/share/mydnsconfig/

Ln-s/usr/share/mydnsconfig/web//var/www/html/mydns


Create a domain table and a record table, etc., which can be quickly created using Mydnsconfig's own script

# mysql-u Mydns-p Mydns < Install/mydnsconfig.sql


Edit the Mydnsconfig configuration file

#vim/usr/share/mydnsconfig/lib/config.inc.php (Modify the authentication password can be)


$conf ["db_type"] = ' mysql ';

$conf ["db_host"] = ' localhost ';

$conf ["db_database"] = ' mydns ';

$conf ["db_user"] = ' mydns ';

$conf ["db_password"] = ' 123456 ';

Note: If the installation directory is not the same as above, modify the value of $conf ["RootPath"]


Modify/ETC/MYDNS.CONF Connection Database information (db-host, Db-user, Db-password)

Finally start httpd, Mydns

Access Http://Server_IP/mydns (account number, password is Amdin)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/45/wKiom1Y0P4qiZy86AAF9mr23k7c397.jpg "title=" 02.png "alt=" Wkiom1y0p4qizy86aaf9mr23k7c397.jpg "/>

Mydns-ng + MySQL + mydnsconfig (Web Management)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.