LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-30-2008, 12:38 PM   #1
dody1313
Member
 
Registered: May 2007
Posts: 179

Rep: Reputation: 30
named to start at boot


hi guys
i have solaris 10
i wanted to have named to start at boot automatically
how can i do that?
thnx in advance
 
Old 05-30-2008, 01:10 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Do you have it installed? I assume you do since you are asking how to start :-)

Anyway...this is how you check if you have it installed (if you installed it by a pkg)
Code:
root@host# pkginfo | grep bind
As root cd into /etc/init.d/ and create a file called named that has something like this (your paths will probably be different):
Code:
#!/sbin/sh
#

case "$1" in
'start')
        if [ -f /etc/named.conf -a -x /usr/sbin/named ] ;then
          echo "Starting DNS name daemon ..."
          /usr/sbin/named &
        else
          echo "Did not start DNS name daemon ..."
        fi
        ;;

'stop')
        echo "Stopping DNS name daemon"
        kill -HUP `cat /var/named/named.pid`
        ;;

*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0
Then make it executable...
Code:
root@host# chmod +x named
Now make your symbolic links so that you can start at boot...
Code:
root@host# ln -s /etc/init.d/named /etc/rc3.d/S95named
root@host# ln -s /etc/init.d/named /etc/rc0.d/K03named
 
Old 05-30-2008, 01:55 PM   #3
dody1313
Member
 
Registered: May 2007
Posts: 179

Original Poster
Rep: Reputation: 30
hi,
i do have bind installed
but according to what u said:
Code:

root@host# ln -s /etc/init.d/named /etc/rc3.d/S95named
root@host# ln -s /etc/init.d/named /etc/rc0.d/K03named

i do not have S95named nore k03named at these specified folders....do i need to create them also?
 
Old 05-30-2008, 01:59 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
If your are using Solaris bundled named, the way to enable it is:
Code:
svcadm enable dns/server
"man named" for configuration details.
 
Old 05-30-2008, 03:48 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by dody1313 View Post
hi,
i do have bind installed
but according to what u said:
Code:

root@host# ln -s /etc/init.d/named /etc/rc3.d/S95named
root@host# ln -s /etc/init.d/named /etc/rc0.d/K03named

i do not have S95named nore k03named at these specified folders....do i need to create them also?
Just Run these commands and it should create it for you...

Code:
root@host# ln -s /etc/init.d/named /etc/rc3.d/S95named
root@host# ln -s /etc/init.d/named /etc/rc0.d/K03named
Also jlliagre is right....if you have it bundeled in then use svcs to enable it...thus eliminating the need for the startup script.

Code:
root@got# svcs -a | grep dns
online         May_24   svc:/network/dns/server:default
online         May_24   svc:/network/dns/client:default
To enable dns server at boot run this command...
Code:
root@host# svcadm enable svc:/network/dns/server:default
This is the preferred (and more elegant) way.

Sorry jlliagre I still have the "old school" way of looking at things

-C
 
Old 05-31-2008, 01:48 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by custangro View Post
To enable dns server at boot run this command...
Code:
root@host# svcadm enable svc:/network/dns/server:default
This syntax is correct however the service name need not to be fully described.
Save some keystrokes by using:
Code:
# svcadm enable dns/server
 
Old 06-01-2008, 07:19 AM   #7
dody1313
Member
 
Registered: May 2007
Posts: 179

Original Poster
Rep: Reputation: 30
thnx guys
am gonna try it out
thnx again 4 the help
 
  


Reply



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
chown -R named:named /var/named crash the system? joangopan Fedora 2 09-09-2007 02:46 AM
named service won't start? a2vr6 Linux - Newbie 10 09-04-2006 04:20 AM
named / BIND won't start TruthSeeker Linux - Newbie 5 07-24-2006 08:40 AM
named failed to start in 2.6.3 mardanian Linux - Software 6 11-25-2004 10:23 AM
How to Start Named - DNS Bind on boot-up. 360 Linux - Networking 0 05-26-2002 08:52 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration