No results found

Your search did not match any results.

We suggest you try the following to help find what you're looking for:

  • Check the spelling of your keyword search.
  • Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
  • Try one of the popular searches shown below.
  • Start a new search.


Trending Questions

How to Configure Oracle Solaris 11 Using the sysconfig Command

November 2011

by Art Beckman

The Oracle Solaris 11 sysconfig command replaces the Oracle Solaris 10 sys-unconfig command and enables you to configure, unconfigure, and reconfigure systems. It also lets you generate system configuration profiles for use with the Automated Installer or with sysconfig itself.


Oracle Solaris 11 uses the Service Management Facility (SMF) to centralize configuration information. The new sysconfig command replaces the older sys-unconfig command and provides a method based upon SMF for unconfiguring an Oracle Solaris 11 instance and reconfiguring it.

In this context, an Oracle Solaris instance is defined as a boot environment in either a global or non-global zone. The sysconfig command also provides configuration and the ability to generate a configuration profile, which can be used to configure a system or with the Automated Installer (AI) to configure newly installed systems.

Oracle Solaris 10 provides the sys-unconfig command to enable users to reset a system to an unconfigured state and prepare the system to be configured on the next boot. With Oracle Solaris 10, a system's configuration parameters are scattered across various files, and resetting the parameters requires the command to be aware of the mechanisms involved in resetting these parameters.

This article provides four examples of how to use the new Oracle Solaris 11 sysconfig command to unconfigure a system, configure a system, interactively reconfigure a system without a full reboot, and generate a configuration profile and use that profile to noninteractively reconfigure a system.

Overview of Oracle Solaris Configuration Commands

The sysconfig command handles the initial configuration of a freshly installed Oracle Solaris instance. It also provides reconfiguration of previously configured Oracle Solaris instances including reconfiguration of the global zone, cloned zones, or Physical-to-Virtual (P2V) migrated systems.

The sysconfig command supports either interactive or noninteractive reconfiguration. It has an option for generating a system configuration profile that can be used as input for a noninteractive configuration on the same system or as a template for other Oracle Solaris instances elsewhere. This profile can also be used with the AI.

The sys-unconfig command is used on Oracle Solaris 10 systems to restore a system's configuration to an as-manufactured state, ready to be reconfigured again on a subsequent boot. The command manipulates or deletes a number of text files and executes all system configuration applications to unconfigure previously configured services. When you run the sys-unconfig command, the system is halted. After you restart the system, a series of text-based screens are presented to walk you through the process of reconfiguring the system.

With Oracle Solaris 10, installation and configuration are tightly coupled. Configuration files exist in many different places in the file system, which complicates overall configuration and can lead to errors.

Oracle Solaris 11 introduces a new installation architecture. One of the design principles of the new architecture is the separation of installation and configuration. This design principle relieves the installer from having to know how to configure software components.

Oracle Solaris 11 uses SMF for configuration. SMF uses a database to centralize the configuration information, it uses the SMF framework to carry out configuration tasks, and it uses SMF properties as an API. SMF is also well integrated with Oracle Solaris Zones technology. This new architecture meets the design principle and additionally provides consistency and reliability over the previous method of using text files located throughout the system.

With Oracle Solaris 11, the configuration of the system is specified as a set of configuration parameters provided in a file called the System Configuration Profile, which is in the form of an SMF profile.

Unconfiguration of a system is used to prepare a system to be moved to a new location and then configured when it is powered up. It can also be used to create zone templates when configuration information isn't known in advance. In this case, the zones are configured as they are deployed.

Reconfiguration of a system is typically done when changing ownership of a system, when sufficient configuration information is changing (which is easier and less error-prone using this method instead of changing individual configuration variables), and when cloning an existing global zone or non-global zone.

The ability to generate a configuration profile greatly simplifies cloning zones as well as providing templates for use with the AI. Each client can use any number of system configuration profiles. For example, a client might be assigned one profile that provides just the host name and IP address for that client. The same client and many other clients might be assigned other profiles that set more broadly applicable property values. These profiles are applied during the first boot of the system after installation is performed by the AI. See the "Adding SC Profiles to an Install Service" section of Installing Oracle Solaris 11 Systems for details on how to use system configuration profiles with AI.

Configuration Examples

This article explores the examples described in Table 1.

Table 1. Configuration Examples

Example Purpose
Unconfigure Prepare a system to be moved or to create a zone template
Configure Perform initial configuration or reconfiguration
Interactive reconfigure Reconfigure a system interactively without a reboot
Noninteractive reconfigure Create a profile to configure or reconfigure one or more systems noninteractively

Unconfiguring an Oracle Solaris 11 System

With Oracle Solaris 10, you type sys-unconfig to unconfigure the system and halt it. For this example, we'll get similar behavior for an Oracle Solaris 11 instance (for either the global zone or a non-global zone) by typing the following:

$sudo sysconfig configure -s
This program will re-configure your system.
Do you want to continue (y/(n))?Y

The -s option shuts down the system after the unconfiguration process is done. This is useful when the system will be migrated and configured in a new environment. Without the -s option, the unconfiguration and reconfiguration take place immediately.

Another useful switch is --destructive, which causes the initial user account home directory to be destroyed. The default is to leave it in place.

Configuring an Oracle Solaris 11 System

The configuration sequence is similar in the following scenarios:

  • When you first install Oracle Solaris 11 using the Automated Installer (AI)
  • When you install Oracle Solaris 11 using the text installer
  • When you reconfigure Oracle Solaris 11
  • After a reboot of a system that has been unconfigured

Whatever path is used, the same text-based-based System Configuration Tool screen appears (Figure 1). Therefore, the following configuration example is a continuation of the other three examples in this article.

Figure 1: Initial System Configuration Tool Screen

Press F2 to continue.

As the next screen (Figure 2) makes clear, the ordering of the questions asked in the System Configuration Interactive tool (SCI) is different from what you might be familiar with from sys-unconfig, but the areas covered are similar to those covered in sys-unconfig.

Besides the process being more streamlined, you now have the option to configure both DNS and either LDAP or NIS together. (NIS+ is no longer supported.) Kerberos configuration is no longer an option (the kclient command is available to configure Kerberos separately). At the present time, IPv6 is automatically configured using DHCP.

Navigation is performed using the up/down arrow keys, the Tab key, and either function keys or the Esc key with number keys.

Figure 2: Network Configuration Screen

The screens you see will vary based on which options you choose. For this example, we'll take the manual network configuration path.

Enter your computer name, highlight Manually, and press F2 to continue. If you select Automatically, you don't have to enter any network information and the system will use DHCP to gather the information.

Figure 3: Network Connection Screen

Pick the primary network connection to configure and then press F2.

Figure 4: Manually Configure Screen

Enter the network settings appropriate for your network and then press F2.

Figure 5: DNS Name Service Screen

Choose to configure DNS by pressing F2.

Figure 6: DNS Server Addresses Screen

Enter the DNS addresses appropriate for your network and then press F2.

Figure 7: DNS Search List Screen

Enter the search domains appropriate for your network and then press F2.

Figure 8: Alternate Name Service Screen

We will not set up an alternate name service at this time, so press F2 to select None.

Figure 9: Time Zone Regions Screen

Select the time zone region appropriate for your location, and press F2.

Figure 10: Time Zones Locations Screen

Select the appropriate location and then press F2.

Figure 11: Time Zone Screen

Select the appropriate time zone and then press F2.

Figure 12: Users Screen

Complete your configuration by entering a root password, your name, a user name, and a password. Then press F2.

The final screen (not shown) is a summary of what you've entered. Verify that the information you've chosen is correct, and then apply the settings by pressing F2.

The system proceeds with the boot process after the SCI exits and the system is configured.

Interactively Reconfiguring an Oracle Solaris 11 System Without Full Reboot

New in Oracle Solaris 11 is the ability to reconfigure a system without a full reboot. This option is used when the system instance (global or non-global zone) in question is being reconfigured without being cloned or moved.

During a reconfiguration, the system is transitioned through dedicated SMF milestones that allow the system configuration to be changed without the need to reboot. The first milestone takes care of the unconfiguration step (the existing configuration is removed). During this step, almost all SMF services are temporarily disabled, which ensures that the system is in sane state after the unconfiguration is complete. The next transition handles configuration, invoking the SCI tool if an interactive configuration is required. Once this step is complete, SMF services apply the new configuration to the system.

For this example, we'll invoke an interactive reconfiguration by typing the following:

$sudo sysconfig configure
This program will re-configure your system.
Do you want to continue (y/(n))?Y

Note the lack of the -s option, which would halt the system. You should be on the console in order to ensure that the SCI tool functions correctly. After you type the command above, the SCI tool appears. At this point, you are at the same beginning screen shown in Figure 1 in the Configuring an Oracle Solaris 11 System.

Another useful switch is --destructive, which causes the initial user account home directory to be destroyed. The default is to leave it in place.

Noninteractively Reconfiguring an Oracle Solaris 11 System Using a Configuration Profile

New in Oracle Solaris 11 is the ability to create a system configuration profile from the command line. The resulting output can be used to reconfigure a system in noninteractive mode and is especially useful for cloned Oracle Solaris instances or for use with the Automated Installer.

Note that if you run the sysconfig create-profile command in a global zone, the output might not be usable for a non-global zone. To create a profile for a non-global zone, run this command from within a non-global zone instead. See How to Get Started Creating Oracle Solaris Zones in Oracle Solaris 11 for examples of working on Oracle Solaris Zones.

For this example, we'll use the create-profile option to generate an XML profile:

$sudo sysconfig create-profile -o ./sc.xml

The command launches the SCI tool (see Figure 1). You can follow the SCI tool sequence described in Configuring an Oracle Solaris 11 System for details. The obvious difference is that there aren't any SMF state transitions or a halt to the system. We end up with the sc.xml profile in the current directory after exiting the tool.

To use the output of the previous command with sysconfig, type the following:

$sudo sysconfig configure -c ./sc.xml
This program will re-configure your system.
Do you want to continue (y/(n))? y

At this point, the system will reconfigure itself using the sc.xml profile. See Interactively Reconfiguring an Oracle Solaris 11 System Without Full Reboot for a discussion on the SMF state transitions involved.

For More Information

Here are some additional resources: