How to setup domain name on CentOS?

ztschutt

New Member
Messages
13
Reaction score
0
Points
0
I just installed Centos on my VPS. I was wondering how I would setup apache so that when you type in my domain name you go to the new server instead of my current shared hosting. I have already backed up everything so I can migrate stuff over, but I cannot figure out how to setup apache with a TLD. I have been searching the internet, but can't find anything actually helpful. Also, I am also going to use this vps as a mail server as well, but I'm pretty sure I know how to set that up.
By the way, I have installed Webmin on the vps, don't know if that will make it easier than editing configuration files.

By the way, I have two IP addresses, one for each nameserver. (NS1 & NS2)

Edit: From my research so far I have been able to guess that I need to use a program called BIND, but I don't know how to set it up.
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
To setup my domain on CentOS I installed Kloxo on the system which basically did all the work for me. I didn't know what name servers to tell Kloxo to use since I didn't buy them, so I used ZoneEdit which provide their own name servers for free, and then I entered the ZoneEdit name servers into Kloxo. Now that that was done, I simply had to add a client and then point my domain to my Server IP Address; worked like a charm :)
 

pornophobic

Member
Messages
32
Reaction score
1
Points
8
Another option, outside of BIND is TinyDNS, AKA djbdns. Kloxo has an option to run under this as well.
There are pros and not very many cons to using TinyDNS over BIND. For instance, it isn't as targeted for vulnerabilities, it can pretty much do anything BIND can with a much smaller memory footprint, it comes packaged with scripts to do different things (i.e add-host, add-mx, add-ns, etc), or if you are like me and would prefer to edit the files manually, the syntax for the configuration file is much, much simpler.

Here is a working example that I use for websites... with the IP and the domains changed.
Code:
#SOA 
Zexample.com:example.com.:example.com.:2011110511:28800:7200:604800:3600:3600

#name servers
&example.com::ns1.example.com.:3600
&example.com::ns2.example.com.:3600

#Domain
=example.com:255.255.255.255:3600

#MX Record
@mail.example.com:255.255.255.255:a::60

#Subdomains
+mail.example.com:255.255.255.255:3600
+ns1.example.com:255.255.255.255:3600
+ns2.example.com:255.255.255.255:3600
+www.example.com:255.255.255.255:3600
+winning.example.com:255.255.255.255:3600

I think I'll write a tut for setting that up as well.

Links:
http://tinydns.org/ - TinyDNS information.
http://cr.yp.to/djbdns.html - djbdns home page & installation instructions.
http://www.revival.stormshadow.com/unix/djbdns/ - Quick install instructions (requires GCC)
 
Last edited:
Top