Fetching contributors…
Cannot retrieve contributors at this time
112 lines (79 sloc) 4.73 KB
* make sure php has support for mysql. On Debian, for example, this would
be the php5-mysql package.
* make sure wget is installed (
Many distributions already have this installed. wget is used for importing
via AXFR, and also for dumping the SQL records to the djbdns data file.
wget must be within the webserver's PATH environment
* make sure MySQL is installed, and that you have an account/database for
vegadns, or the ability to create an account and database. Again, many
distributions already have this installed.
* make sure djbdns (, ucspi-tcp
(, and daemontools
( are all installed.
* make sure you create the djbdns accounts Gtinydns and Gdnslog for later use.
NOTE: The Following steps assume your ServerRoot is /usr/local/apache, and
that your daemontools service directory is /service.
Please substitute the appropriate paths if necessary.
Likewise, you should substitue "myserver" for your real hostname, and
x.x in "vegadns-x.x" with the version of VegaDNS you are using.
1. Change into your web server's DocumentRoot like so:
cd /usr/local/apache/htdocs/
2. Get and unpack vegadns source:
tar -xzf vegadns-current.tgz
3. Setup SQL account (replace 'secret' below with your desired password):
mysqladmin -u root create vegadns -p
mysql -u root -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON vegadns.* TO vegadns@localhost IDENTIFIED BY 'secret'" mysql -p
4. Create the private vegadns directories for templates, sessions in your
web server's ServerRoot, and have them owned by the user/group that the
web server runs as (nobody:nobody in this example)
mkdir -p /usr/local/apache/vegadns/templates_c
mkdir /usr/local/apache/vegadns/configs
mkdir /usr/local/apache/vegadns/cache
mkdir /usr/local/apache/vegadns/sessions
chown -R nobody:nobody /usr/local/apache/vegadns
chmod -R 770 /usr/local/apache/vegadns
5. Edit the vegadns-x.x/src/config.php file. Make *sure* that the
"private_dirs" variable is set properly, as well as the MySQL account
information, and and also the "vegadns_url" variable.
6. Create a tinydns service on for testing
tinydns-conf Gtinydns Gdnslog /etc/tinydns
ln -s /etc/tinydns /service
7. Log into VegaDNS for the first time to create the tables, and update the
default login information by pointing your web browser to:
The default admin login is email "", password "test"
Next, you should edit "default_records" so that new domains have the proper
SOA record, and that they have name servers, etc. Once this is done, you
can add or import a domain, then setup the data dumps in the next step.
8. To install the script (currently located in the root
directory of vegadns), you will need to first edit the VEGADNS variable to
point to the correct url. You may also need to update the TINYDNSDIR
variable if you used something other than /etc/tinydns.
Try exectuting the shell script. Once you confirm that
this is working correctly, move to /usr/local/sbin/ and then
add it to cron to run every 10 minutes or so, whatever is appropriate.
You'll an entry to your crontab like so:
# Update tinydns with VegaDNS data
*/10 * * * * /usr/local/sbin/
NOTE: If intend to run from an IP other than, then
you will need to add that IP to $trusted_hosts in config.php
To report success:
% ( echo 'First M. Last'; echo `uname -a` ) | mail
To use the Import domains via AXFR, you must first setup the remote host to
allow AXFR request from this machine. Note that if your VegaDNS machine
has multiple IP addresses, that you allow AXFR from the same IP that the
outbound request is made. Look in the logs of the remote server if you
are having problems connecting.
NOTE on IPv6
IPv6 support is disabled by default. To enable it, set $use_ipv6 to true in
src/config.php. This will allow you to create AAAA records using the generic
record syntax. You may also create automatic PTR records for your AAAA records
by choosing the AAAA+PTR record. This will generate the matching PTR record
during export from the database. Note that if you use AAAA+PTR, tinydns will
not respond to PTR requests unless you separately add SOA and NS records for the domain.