NetAdminTools.com
 
SignalQ Sites:
L1G3R Information Systems - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Solar Energy - Energy Efficiency - Solar Panels
Home Energy Savings
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Replace Aging BIND on Virtual Dedicated Host - Part 3 - Modify SysV Init Scripts and PID Home
Topic:Name Resolution   Date: 2008-08-03
Printer Friendly: Print   

spacerspacer
<<  <   >  >>

Subject

1 | 2 | >3<

We need a directory for the PID, and put it in /var/run/named:

# mkdir /var/run/named
# ls -ld /var/run/named
drwxr-xr-x 2 root root 4096 Aug  3 07:58 /var/run/named
# chown named /var/run/named
# chgrp named /var/run/named
# ls -ld /var/run/named
drwxr-xr-x 2 named named 4096 Aug  3 07:58 /var/run/named
# chmod 770 /var/run/named
# ls -ld /var/run/named
drwxrwx--- 2 named named 4096 Aug  3 07:58 /var/run/named
#

At this point, the only real difference between our newly compiled install and the FC6 RPM is where the PID is and the binaries. Here is a diff between the FC6 init file and ours showing where the paths changed:

# diff named /root/namedinit
35c35
< if [[ "$ENABLE_SDB" = [yY1]* ]] && [ -x /usr/local/sbin/named_sdb ]; then
---
> if [[ "$ENABLE_SDB" = [yY1]* ]] && [ -x /usr/sbin/named_sdb ]; then
40c40
< [ -x /usr/local/sbin/$named ] || exit 1
---
> [ -x /usr/sbin/$named ] || exit 1
154c154
< 	if [ -x /usr/local/sbin/named-checkconf ] && [ -x /usr/local/sbin/named-checkzone ] 
&& /usr/local/sbin/named-checkconf $ckcf_options ${named_conf} >/dev/null 2>&1; then
---
> 	if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] 
&& /usr/sbin/named-checkconf $ckcf_options ${named_conf} >/dev/null 2>&1; then
160c160
<	   daemon /usr/local/sbin/$named -u named ${OPTIONS};
---
> 	   daemon /usr/sbin/$named -u named ${OPTIONS};
181c181
<	   named_err="`/usr/local/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";	   
---
> 	   named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";	   
199c199
< 	/usr/local/sbin/rndc stop >/dev/null 2>&1 
---
> 	/usr/sbin/rndc stop >/dev/null 2>&1 
244c244
<	/usr/local/sbin/rndc status
---
> 	/usr/sbin/rndc status
257c257
<	    /usr/local/sbin/rndc reload >/dev/null 2>&1 || /bin/kill -HUP $p;
---
> 	    /usr/sbin/rndc reload >/dev/null 2>&1 || /bin/kill -HUP $p;
267c267
<	/usr/local/sbin/rndc reload >/dev/null 2>&1 || echo start
---
> 	/usr/sbin/rndc reload >/dev/null 2>&1 || echo start
276c276
<	if [ -x /usr/local/sbin/named-checkconf ] && [ -x /usr/local/sbin/named-checkzone ] 
&& /usr/local/sbin/named-checkconf $ckcf_options ${named_conf} | cat ; then
---
> 	if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] 
&& /usr/sbin/named-checkconf $ckcf_options ${named_conf} | cat ; then
#

Let's try and start the service:

# /etc/init.d/named start
Starting named:                                            [  OK  ]
# 
# tail -f /var/log/messages
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: starting BIND 9.5.0-P2 -u named
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: loading configuration from '/etc/named.conf'
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: no IPv6 interfaces found
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: listening on IPv4 interface venet0:0, 5.5.5.5#53
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: listening on IPv4 interface venet0:1, 5.5.5.6#53
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: default max-cache-size (33554432) applies
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: default max-cache-size (33554432) applies: view _bind
Aug  3 12:26:37 ip-5.5.5.5 named[7181]: command channel listening on 127.0.0.1#953

# ps -ef | grep named
named    27770     1  0 Jun16 ?        00:00:00 /usr/local/sbin/named -u named
root     28367 27991  0 Jun16 pts/0    00:00:00 grep named
# 

Looks good!

1 | 2 | >3<


People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2011 NetAdminTools.com