JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Getting Started With Oracle Solaris 11 Express     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

1.  Exploring Oracle Solaris 11 Express

2.  Preparing to Install Oracle Solaris 11 Express

3.  Installing Oracle Solaris 11 Express

4.  Verifying and Finalizing Your Installed System

5.  Understanding Users and Roles

6.  Managing System Services

Managing Services on Your System

Enabling Services From the Desktop

How to Enable SMF Services From the Desktop

Enabling Services From the Command Line

How to List the Services on an Installed System

How to Start a Service

How to Stop a Service

Related Information

7.  Setting Up Your Application Development Environment

8.  Keeping Your System Up-To-Date

A.  Managing the GRUB Menu in the Oracle Solaris Release

B.  Troubleshooting the Oracle Solaris 11 Express Release

Index

Managing Services on Your System

UNIX operating systems traditionally include a set of services or software programs that are not associated with any interactive user login. SMF provides an infrastructure that augments the traditional UNIX startup scripts, init run levels, configuration files, as well as other services and software programs.

Services listen for and respond to requests to perform certain tasks, for example:

SMF simplifies the management of these system services, by creating a supported, unified model for services and service management on each Oracle Solaris system.

The fundamental unit of administration in the SMF framework is the service instance. Each service instance is named with a Fault Management Resource Identifier (FMRI). The FMRI includes the service name and the instance name. For example, the FMRI for the sendmail service is svc:/network/smtp:sendmail, where network/smtp identifies the service and sendmail identifies the service instance.

Examples of other acceptable FMRIs include the following:

Services can be enabled from the GNOME desktop or by using the command line.

For more information, see the smf(5) man page.

Enabling Services From the Desktop

You can enable and disable some services that are installed on a system by using the Services application that is located in the GNOME desktop. Enabling and disabling services by using the Services application is equivalent to using the svcadm command.

The services that can be viewed and managed from the desktop depend on the authorizations that are assigned to the user account and the service itself.

How to Enable SMF Services From the Desktop

To enable SMF services from the GNOME desktop, follow these steps:

  1. Choose System -> Administration -> Services.

    The SMF Services window open, with the Enabled instances option (in the left pane) selected. The number of service instances that are enabled is also displayed. In the State column all enabled services are displayed as “online”.

    • To view all service instances and their statuses, click the All instances option in the left pane of the SMF Services window.

      In this view, all service instances are listed. Online services are listed first, followed by offline and disabled services.

    • To view unhealthy service instances, click the Unhealthy instances option in the left pane of the SMF Services window.
  2. To disable or enable a service instance, do the following:
    • To disable a service instance:
      1. With the Enabled instances option selected, from the list of services that is displayed, locate the service to disable.
        • To search for the service, type the name (or part of the name) of the service in the Filter field at the top of the SMF Services window.
      2. Click the Disable button.

        A message alerting you that the service has been disabled is displayed. Also displayed are instructions on how to enable the service from the command line.

    • To enable a service instance, do the following:
      1. Click the All instances option in the left pane of the SMF Services window.
      2. From the list of disabled services, locate the service to enable, then click the Enable button.

        The service state transitions from disabled to offline, and eventually to an online state.

        • If the service instance does not transition to an online state within a few seconds, click the Enabled instances option and search for the service instance.

          The State column for the service should now display the service as “online.


    Caution

    Caution - Do not randomly disable or enable services from the desktop. Doing so can prevent a system from booting.


Enabling Services From the Command Line

The svcs command is used to identify which services are installed on a system. The svcadm command is used to administer or change the state of a service. To configure SMF services, you must assume a role with appropriate privileges, such as the root role.

For more information, see the svcs(1) and svcadm(1M) man pages.

How to List the Services on an Installed System

  1. Open a terminal window.
  2. To list all of the services that are installed and enabled on a system, type:
    $ svcs
    • To list all of the services that are installed on the system, and the status of each service, use the svcs command with the -a option.

      $ svcs -a

      This command displays all of the services, including those that are disabled.

    • To display the status of a specific service, use the svcs command with the -l option.

      $ svcs -l FMRI

How to Start a Service

If a program is managed by SMF, use the svcadm command to start it.

  1. Open a terminal window.
  2. Type the command to start the service.
    $ svcadm enable FMRI
  3. Verify that the service is running.
    $ svcs -a | grep FMRI

How to Stop a Service

  1. Open a terminal window.
  2. Type the command to stop the service.
    $ svcadm disable FMRI