LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-13-2007, 12:05 PM   #1
girish_hilage
Member
 
Registered: Oct 2003
Posts: 78

Rep: Reputation: 15
starting services on solaris


1. What is the command to start services on solaris.
(Like on RH we have "service" command to start services.)

2. In which directory the service scripts exists on solaris (on RH its in a directory /etc/rc.d/init.d/).
 
Old 03-13-2007, 12:14 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
"service" is unique to Linux.

The files are in /etc/init.d on Solaris, /sbin/init.d/ on HP-UX.

So in Solaris instead of "service nfs.client start" you can just type "/etc/init.d/nfs.client" start. (Which by the way you can do on most the Linux distros that use /etc/init.d or a link named that for the service files like RHEL, FC6 and Debian.)
 
Old 03-13-2007, 12:33 PM   #3
Necronomicom
Member
 
Registered: Jun 2004
Distribution: Slackware, Solaris
Posts: 127

Rep: Reputation: 15
older solaris have the service scripts located at /etc/init.d/, and on solaris 10 you can use "svcs -a" to see all your services, and do "svcadm enable/disable ftp" to enable disable the particular service
 
Old 03-13-2007, 01:06 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
Solaris 10 and Express support both the legacy System V way or starting and stopping services and the new one described by Necronomicom.

Here's a useful FAQ: http://opensolaris.org/os/community/smf/faq/
 
Old 03-13-2007, 01:29 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
"legacy" - that would imply it's at least 10 years old - oh wait...

My age is showing again.
 
Old 03-13-2007, 02:52 PM   #6
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
If you have installed the GUI you can also use
Code:
services-admin
or a command like that.
 
Old 03-20-2007, 01:05 AM   #7
antares727
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
OK Guys -- Legacy or not

Be kind -- Legacy is yesterday's kernel compile!

For Solaris --- Legacy is any build that is not Solaris 10 ---

OK my age is showing -- I worked on UNIX System III and Sun OS

I still have Solaris 5.5, Solaris 5.6, <one Solaris 5.7> and a bunch of Solaris 5.8 servers running --- Solaris 9 (only if the application requires it)

Solaris 10 was a "Major" advance in the way Solaris operates --- Yes it has "services" --- it has a registry --- and it uses a "bunch" of XML files to define most of this --- The reason for the move to services was a faster boot --- the legacy Solaris loaded each run level entry serially... started the init script and waited until it finished before moving on -- The Solaris 10 starts the services in parallel and only serially if a service depend on another for operation...

You "can" configure the /etc/inet/inetd.conf (I think that is the "Legacy File")(well if I don't have the name 'just' right, someone will tell me!)
Anyway -- this is a "one time" deal SET your inetd.conf file up just the way you want it --- follow the instructions at the top of the file and it will "enable/disable" your old item under the services structure ---

To see what "services" are running --this will list them all <see the man page for options)

# svcs

To enable or start a service --

# svcadm enable ssh (for example)

You can enter the entire service tree, but is it seldom necessary ---

# svccfg --- this is the command for configuring a service --- I have only needed to use this command once in the three years I have been working with Solaris 10...

Yes we still have the /etc/services file

The Sun Doc or Big Admin web site has more info then I could ever get into --- I have to keep a "cheat sheet" close just make it easy ---

I run openSUSE also, but I go through YaST2 if I need to configure the process (i.e. ntp ) Regardless -- I have found i still need files in the rc.d startup directories --- The services just makes it so much easier to set it once and forget -- (unless the service goes into a maintenance state -- that's another topic)



Have fun

Never look back --

Dale
 
Old 03-20-2007, 01:31 AM   #8
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:
For Solaris --- Legacy is any build that is not Solaris 10 ---
Legacy is the "official" term used in Solaris documentation, files and commands to distinguish the previous System V rc startup commands from the new model (smc). AFAIK, it is not used elsewhere.
 
  


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
Starting services tstuart Linux - Newbie 5 09-07-2006 08:05 AM
Starting different services at boot mjjzf Slackware 2 05-21-2005 01:46 PM
Enabling Services in Solaris 8 njugs79 Solaris / OpenSolaris 2 04-12-2005 11:48 AM
Starting services at bootup Lucasite Linux - Newbie 5 04-17-2004 02:08 PM
Starting Services InEeDhElPlInUx Linux - Newbie 9 11-06-2003 11:57 AM

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

All times are GMT -5. The time now is 11:35 PM.

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