LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   how to stop services (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-stop-services-598247/)

packets 11-09-2007 12:51 AM

how to stop services
 
I'm new to Solaris so please bear with me.

After I install Linux, I usually disable services that are not relevant for startup like nfs,rpc,portmap,etc.

In Solaris, I done some ps -ef:

/usr/lib/nfs/nfs4cbd
/usr/sbin/rpcbind
/usr/lib/nfs/statd

These are the some that I want to disable. How can I disable them?

I done svcs and saw some of the ff:

online Nov_04 svc:/network/rpc/gss:default
online Nov_04 svc:/network/rpc/meta:default
online Nov_04 svc:/network/rpc/cde-calendar-manager:default
online Nov_04 svc:/network/rpc/cde-ttdbserver:tcp
online Nov_04 svc:/network/rpc/mdcomm:default
online Nov_04 svc:/network/rpc/metamed:default
online Nov_04 svc:/network/rpc/metamh:default
online Nov_04 svc:/network/rpc/rstat:default
online Nov_04 svc:/network/nfs/client:default
online Nov_04 svc:/network/rpc/rusers:default

I do svcadm disable nfs abut it says:

-bash-3.00# svcadm disable nfs
svcadm: Pattern 'nfs' doesn't match any instances

How can I determine the services though it stated in ps that the nfs,etc. is running?

Disillusionist 11-09-2007 01:36 AM

Not used solaris personally, however:

You should be able to stop the running processes by:
Code:

/etc/init.d/nfs stop
To stop nfs from starting at boot time, check the startup folders (example: /etc/rc2.d) for a link file:

S40nfs -> /etc/init.d/nfs

Remove the link file (note the directory and filename so that you can recreate them later!)

Do not remove the file from /etc/init.d

kebabbert 11-09-2007 03:33 AM

I think that the correct way is through the svcadm command. And not juggling with files. There is also the svcs command, i think. Check them up?

jlliagre 11-09-2007 04:51 AM

You can stop nfs with "svcadm disable nfs/client".

You can stop all services but ssh with the "netservices limited" command (see http://www.linuxquestions.org/questi...97#post2943297 for a similar thread).

Paris Heng 03-15-2009 12:00 AM

Hi, it is sufficient to close like this?

Code:

/etc/init.d/rpcXXXX stop

jlliagre 03-15-2009 03:44 AM

There is no such rc script under Solaris 10 and newer.

Paris Heng 03-15-2009 05:08 AM

So , the only way is through svcadm ya


All times are GMT -5. The time now is 01:45 AM.