1. Install apache, mysql server, php
1 | yum install httpd mysql-server php php-mysql php-mbstring |
2. Enable mysql to start at boot, and start mysql server
2 3 | /sbin/chkconfig --levels 235 mysqld on /etc/init.d/mysqld start |
3. Set mysql password
4 | mysqladmin -u root password yourrootsqlpassword |
4.Enable apache to start at boot, start apache server
5 6 | /sbin/chkconfig --levels 235 httpd on /etc/init.d/httpd start |
5. Comment out all lines in /etc/httpd/conf.d/welcome.conf
6. Configure MySQL
7 8 9 10 11 | mysql -u root -p mysql> CREATE DATABASE mydns; mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO 'mydns'@'localhost' IDENTIFIED BY 'secret_mydns'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON mydns.* TO 'mydns'@'localhost.domain.com' IDENTIFIED BY 'secret_mydns'; mysql> FLUSH PRIVILEGES; |
7. Download frontend to MyDNS, untar it, copy the necessary data
12 13 14 15 16 17 18 19 | cd /usr/src/ wget http://mesh.dl.sourceforge.net/sourceforge/mydnsconfig/MyDNSConfig-1.1.0.tar.gz tar xvfz MyDNSConfig-1.1.0.tar.gz cd MyDNSConfig-1.1.0 mkdir /usr/share/mydnsconfig cp -rf interface/* /usr/share/mydnsconfig/ ln -s /usr/share/mydnsconfig/web/ /var/www/mydns mysql -u root -p mydns < install/mydnsconfig.sql |
8. Enter correct Mysql data
20 | vi /usr/share/mydnsconfig/lib/config.inc.php |
$conf["db_type"] = 'mysql'; $conf["db_host"] = 'localhost'; $conf["db_database"] = 'mydns'; $conf["db_user"] = 'mydns'; $conf["db_password"] = 'mydnspassword';
9. Configure apache for mydnsfrontend, the root of the site is /usr/share/mydnsconfig/
Default MyDNS Username and Password = admin
10. Download MyDNS, install the RPM and configure to turn it on at startup
21 22 23 24 | cd /usr/src wget http://mydns.bboy.net/download/mydns-mysql-1.1.0-1.i386.rpm rpm -ivh mydns-mysql-1.1.0-1.i386.rpm /sbin/chkconfig --levels 235 mydns on |
11. Edit mydns.conf, change username and password and add the following lines to the end of the file.
25 | vi /etc/mydns.conf |
db-host = localhost # SQL server hostname db-user = username # SQL server username db-password = password # SQL server password database = mydns # MyDNS database name allow-axfr = yes allow-tcp = yes recursive = 123.456.789.012 # Location of recursive resolver
12. Turn on MyDNS and change the sequence of the startup scripts
26 27 28 29 30 31 32 | /etc/init.d/mydns start cd /etc/rc.d/rc3.d mv S52mydns S99mydns cd /etc/rc.d/rc4.d mv S52mydns S99mydns cd /etc/rc.d/rc5.d mv S52mydns S99mydns |
October 26th, 2009 on 6:18 pm
[...] 1. Setup MyDNS master server – here [...]