LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-01-2007, 11:43 AM   #1
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Rep: Reputation: 33
No config files after installation of bind9


Hi

I just installed bind9 on a server i have, but after installation when i was going to configure it i couldnt find any configuration files, not even named.conf. Usually when i have installed bind it comes with samples configuration files and/or at least named.conf. I installed bind9 from source this time so i guess there wont be any sample config files now, but at least the main config file, but its not present.

I did find the named.conf file in the directory where i extracted the tar ball..but it didnt come with the install (to the directory where i installed bind) which i find weird. Is it suppose to be like this, that you have to search for and then copy the main config file from the directory where you extracted the bind tarball to the directory were you installed bind?

Another thing i also found werid was that the two scripts "named-checkzone" and "named-checkconf" also didnt come with the installation so i also have to copy these to the installation directory where i installed bind. Does someone know why these scripts arent copied directory to the installation directory ?

Thanks for all your help.
 
Old 09-01-2007, 12:23 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 78
Have to asked, but did you do make install? According to the latest bind documentation, the default is to install named.conf in /etc.

"make install" will install "named" and the various BIND 9 libraries. By default, installation is into /usr/local, but this can be changed with the "--prefix" option when running "configure".

You may specify the option "--sysconfdir" to set the directory where configuration files like "named.conf" go by default, and "--localstatedir" to set the default parent directory of "run/named.pid". For backwards compatibility with BIND 8, --sysconfdir defaults to "/etc" and --localstatedir defaults to "/var" if no --prefix option is given. If there is a --prefix option, sysconfdir defaults to "$prefix/etc" and localstatedir defaults to "$prefix/var".


http://www.isc.org/index.pl?/sw/bind...lease=9.3.2-P2

The default install directory is /usr/local so the system binaries should go in /usr/local/sbin.
 
Old 09-01-2007, 04:53 PM   #3
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Original Poster
Rep: Reputation: 33
Yes, i did a "make install" after the compilation of bind otherwise it wouldnt be installed. I usually use the --prefix option to have control over where i install programs. I tried the --sysconfdir option that you mentioned and then tried to run the configure script again (after "make clean") with this option and then compiled bind and installed it again, but there was no change. There is no named.conf in the /etc directory.
 
Old 09-01-2007, 05:19 PM   #4
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 78
Very odd?

You've probably already figured out where the files go for a default install:

/etc - configuration file
/usr/local/sbin - local installed system binaries/scripts/utilities
/usr/local/man - local installed manual pages
/usr/local/lib - local installed libraries
yada yada yada

I usually place local installed starup routines in the rc.local file, something like:

if [ -x /usr/local/sbin/named -a -f /etc/named.conf ]; then
echo -n "Starting bind ..."
/usr/local/sbin/named -c /etc/named.conf
echo "Done"
fi

I'll build and install the latest bind, might be something wrong with the installer. Maybe you found a bug?
 
Old 09-01-2007, 06:32 PM   #5
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Original Poster
Rep: Reputation: 33
Yes, it seems very odd. When i use this command to run the configure script: ./configure --prefix=/usr/local/bind --sysconfdir=/usr/local/bind/etc --disable-openssl-version-check ..i get the named-checkzone and named-checkconf scripts now, but still no named.conf anywhere.

The reason i used "--disable-openssl-version-check" is because the configure script doesnt seem to find the updated openssl version which i also installed from source code.

The manual pages, libraries and stuff seems to be in the installation directory. It might be a bug, but its probably something im doing wrong eventhough im doing it right-by-the-book as described in the README file and other documentation. What i could do is get a named.conf file by searching google, but this shouldnt really be necessary i guess..maybe there is something in the installation that doesnt create or copy the named.conf file to the installation directory.

It would be interesting to see if you experienced the same after installation.
 
Old 09-01-2007, 06:59 PM   #6
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Original Poster
Rep: Reputation: 33
I did a couple of more installation of bind now and did some troubleshooting.

I read in the documentation that i could just specify with the "--with-openssl" option where i installed the latest openssl version and then the configure script ran without any errors (at least i couldnt see any when it scrolled by the screen). As with the previous installations i did with bind i couldnt find the named.conf file. I then checked the logs to try to find out what was going on.

/var/log/messages printed the following information:
Code:
Sep  2 03:21:47 localhost named[10067]: starting BIND 9.4.1-P1
Sep  2 03:21:47 localhost named[10067]: loading configuration from '/usr/local/b
ind/etc/named.conf'
Sep  2 03:21:47 localhost named[10067]: none:0: open: /usr/local/bind/etc/named.
conf: file not found
Sep  2 03:21:47 localhost named[10067]: loading configuration: file not found
Sep  2 03:21:47 localhost named[10067]: exiting (due to fatal error)
I had not done any configuration or editing to any files related to bind and it seems like bind tries to start up after installation like most services does after installation, but here fails because it cant find the main config file. Something seems to be wrong.

I also did another installation of bind without the use of the "--prefix" option and i only used the "--with-openssl" option. After installation i couldnt even find the installation directory where bind was installed. After i ran the command "find / -name bind" it didnt seem to find the installation directory.
 
Old 09-01-2007, 07:54 PM   #7
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 78
I found conflicting (at least I think so) information about /etc/named.conf file.

The current release documentation would make one believe named.conf will be installed in /etc by default:

You may specify the option "--sysconfdir" to set the directory where configuration files like "named.conf" go by default, and "--localstatedir" to set the default parent directory of "run/named.pid".

The ./configuration script comments would also make one believe named.conf will be installed in /etc by default, unless --sysconfdir= is used:
Code:
# Special processing of paths depending on whether --prefix,
# --sysconfdir or --localstatedir arguments were given.  What's
# desired is some compatibility with the way previous versions
# of BIND built; they defaulted to /usr/local for most parts of
# the installation, but named.boot/named.conf was in /etc
# and named.pid was in /var/run.
#
# So ... if none of --prefix, --sysconfdir or --localstatedir are
# specified, set things up that way.  If --prefix is given, use
# it for sysconfdir and localstatedir the way configure normally
# would.  To change the prefix for everything but leave named.conf
# in /etc or named.pid in /var/run, then do this the usual configure way:
# ./configure --prefix=/somewhere --sysconfdir=/etc
# ./configure --prefix=/somewhere --localstatedir=/var
I tried the --sysconfdir=/etc and named.conf did not appear in either /etc or /usr/local/etc.

But!!!

The FAQ says this about it:

Q: Isn't "make install" supposed to generate a default named.conf?
A: Short Answer: No.

Long Answer: There really isn't a default configuration which fits any site perfectly. There are lots of decisions that need to be made and there is no consensus on what the defaults should be. For example FreeBSD uses /etc/namedb as the location where the configuration files for named are stored. Others use /var/named.


So, in the end (as you have observed) one has to create their own site specific named.conf file and place it where their bind setup will find it and use it's settings.
 
Old 09-02-2007, 05:07 AM   #8
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Original Poster
Rep: Reputation: 33
Ah, good to find that out ..Thanks for all your help.

When it comes to compiling bind from source you then have to (as you found out) create your own named.conf because its distribution specific and when using package managers this isnt a problem because package managers always use distribution specific packages which are for the distribution you are working on, so it will then be able to know where to create the named.conf file.

Its nice to find out some of the differences too about what you get when you install a tar ball compared to what you get when using package managers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with bind9 config ssfrstlstnm Linux - Networking 4 04-13-2007 06:41 PM
Doom 3: Using native installer and can't locate saved game files or config files JBailey742 Linux - Games 11 08-14-2006 06:09 PM
DB for config instead of config files twistedpair Linux - Software 1 11-28-2005 04:39 PM
Webmin cannot handle Samba config files that use the config or include directives allelopath Linux - Networking 3 01-18-2005 09:36 AM
question on config files vs build files working2hard Programming 2 07-29-2004 11:45 AM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration