« I Love FreeBSD! | Main | First Website Is Running »
January 07, 2005
DNS Setup
Unfortunately I stuck at the DNS setup, I have read the handbook many times, but still don't have a clear idea about it.
Here is what I have done yesterday:
1. Running bind 9 (doc).
Create a zone file according to the example in the handbook, but later I found it's for bind 8, someone told me bind 9 is quite different. I got a bind 9 zone sample from the Internet, it didn't work either. named-checkzone checking got the following error message:
mydomain.com:1: unknown RR type 'mydomain.com.'
mydomain.com:19: using RFC 1035 TTL semantics
mydomain.com:20: ignoring out-of-zone data (mydomain.com)
dns_rdata_fromtext: mydomain.com:29: near '#': extra input text
mydomain.com:30: ignoring out-of-zone data (mydomain.com)
dns_rdata_fromtext: mydomain.com:30: near '#': extra input text
zone myaccount/IN: loading master file mydomain.com: unknown class/type
Useful commands
Start/stop/restart bind, this also applies to most other common services.
# /etc/r0.d/named start[stop/restart/status]
Check zone file
# /usr/sbin/named-checkzone account_name zonefile
Check latest error message
# tail /var/log/messages
2. Running Apache (doc)
Create virtual host entry in Apache configuration file. The website can be accessed by IP address.
Apache configuration file is at /usr/local/etc/apache/httpd.conf on FreeBSD.
Apache is one of the few services which don't run from inetd according to the handbook.
# /usr/local/sbin/apachectl start[stop/restart]
Restart Apache without aborting current connections, this is very interesting to me, never heard of it.
# /usr/local/sbin/apachectl graceful
A nice admin in the IRC room logined my server to help me locate the problem, but failed to fix it. Although I didn't make the website up and running, I learnt many things during the process.
I'm too lazy to work on it today, anyway I'm not in rush.
Category : DNS
Posted by FreeBSD Newbie at January 7, 2005 03:48 AM
