First Steps With Solaris 11

17
OTN is all about helping you become familiar enough with Oracle technologies to make an informed decision. Articles, software downloads, documentation, and more. Join up and get the technical resources you need to do your job. Taking Your First Steps with Oracle Solaris 11 November 2011 by Brian Leonard and Glynn Foster Note: This article replaces the Solaris 11 Express version. Oracle Solaris 11 Express is no longer supported byOracle. An introduction to installing Oracle Solaris 11, including the steps for installing new software and administering other system configuration. Oracle Solaris 11 is distributed with several different installation options: a handsfree automated serverbased install, an interactive textbased install that is also suitable for servers, and an interactive graphical installer that includes a full desktop environment. This article focuses on the interactive graphical installer, although manyof the concepts discussed in this article apply to the other Oracle Solaris 11 installation options. Users coming from Oracle Solaris 10 are urged to take a look at the Transitioning from Oracle Solaris 10 to Oracle Solaris 11 guide. The graphical installer is officially known as the "Live Media." This means that Oracle Solaris can be booted into RAM, causing zero impact on your existing operating system. After it is loaded, you are free to experiment with Oracle Solaris to determine whether it is something you would like to install to your system. You can download Oracle Solaris 11 Live Media for x86, which is an approximately 800 MB image file, and use a DVD burner to create the disk, or you can use the ISO image directly in a virtual machine or through the Oracle Integrated Lights Out Manager (ILOM) Remote Console. The Live Media is not intended for longterm use. For example, any changes that you make to the system are lost when the system is shut down. Therefore, the next logical step is to install Oracle Solaris on the system, which the Live Media makes easy by placing an Install Oracle Solaris icon right on the desktop. But before we head down that road, let's step back a bit and consider the installation options. Installation Options You have several alternatives for where to install Oracle Solaris 11: Inside a virtual machine on top of your existing operating system On the bare metal as a standalone operating system On the bare metal alongside your existing operating system(s) (multiboot scenario) Installing Inside a Virtual Machine The easiest way to start using Oracle Solaris 11 is to install it into a virtual machine on top of your existing operating system. Figure 1 shows Oracle Solaris 11 installed on Apple OS Xusing Oracle VMVirtualBox.

Transcript of First Steps With Solaris 11

Page 1: First Steps With Solaris 11

OTN is all about helpingyou become familiarenough with Oracletechnologies to make aninformed decision. Articles,software downloads,documentation, and more.Join up and get thetechnical resources youneed to do your job.

Taking Your First Steps with Oracle Solaris 11November 2011

by Brian Leonard and Glynn Foster

Note: This article replaces the Solaris 11 Express version. Oracle Solaris 11 Express is no longer supported by Oracle.

An introduction to installing Oracle Solaris 11, including the steps for installing new software and administering other system configuration.

Oracle Solaris 11 is distributed with several different installation options: a hands­free automated server­based install, an interactive text­basedinstall that is also suitable for servers, and an interactive graphical installer that includes a full desktop environment.

This article focuses on the interactive graphical installer, although many of the concepts discussed in thisarticle apply to the other Oracle Solaris 11 installation options. Users coming from Oracle Solaris 10 are urgedto take a look at the Transitioning from Oracle Solaris 10 to Oracle Solaris 11 guide.

The graphical installer is officially known as the "Live Media." This means that Oracle Solaris can be bootedinto RAM, causing zero impact on your existing operating system. After it is loaded, you are free to experimentwith Oracle Solaris to determine whether it is something you would like to install to your system.

You can download Oracle Solaris 11 Live Media for x86, which is an approximately 800 MB image file, and usea DVD burner to create the disk, or you can use the ISO image directly in a virtual machine or through theOracle Integrated Lights Out Manager (ILOM) Remote Console.

The Live Media is not intended for long­term use. For example, any changes that you make to the system arelost when the system is shut down. Therefore, the next logical step is to install Oracle Solaris on the system,which the Live Media makes easy by placing an Install Oracle Solaris icon right on the desktop. But before wehead down that road, let's step back a bit and consider the installation options.

Installation Options

You have several alternatives for where to install Oracle Solaris 11:

Inside a virtual machine on top of your existing operating systemOn the bare metal as a standalone operating systemOn the bare metal alongside your existing operating system(s) (multiboot scenario)

Installing Inside a Virtual Machine

The easiest way to start using Oracle Solaris 11 is to install it into a virtual machine on top of your existing operating system. Figure 1 shows OracleSolaris 11 installed on Apple OS X using Oracle VM VirtualBox.

Page 2: First Steps With Solaris 11

Figure 1. Oracle Solaris on Apple OS X

You are guaranteed that Oracle Solaris 11 will recognize the virtualized devices that the virtual machine provides. If you run Oracle Solaris 11 in full­screen mode, you might actually forget that there's another operating system underneath.

The one drawback to this approach is that you need enough memory to run two operating systems simultaneously—a minimum of 2 GB isrecommended for good performance. You should also allow a minimum of 7 GB of disk space to install the operating system.

Oracle VM VirtualBox is a free­to­download hypervisor that supports Microsoft Windows, Apple OS X, Linux, and Oracle Solaris as host platforms, and,of course, Oracle Solaris as one of its many guests. Oracle makes it easy to try this approach by also offering a number of preinstalled virtualmachines for Oracle VM VirtualBox that are focused towards a specific use, for example, to evaluate the developer tools that are available on OracleSolaris 11.

After you have booted off the Live Media, the installation process is straightforward. Simply click the Install Oracle Solaris icon on the desktop tolaunch the graphical installer, shown in Figure 2.

Figure 2. The Oracle Solaris Graphical Installer

As you can see from Figure 2, the installation process is simple and asks some basic questions before laying down a fixed set of packages. AfterOracle Solaris has successfully been installed, you can easily customize the installation by using the Package Manager.

After the installation process is complete, you can simply reboot into your new Oracle Solaris environment or review the Oracle Solaris installationlog, as shown in Figure 3.

Page 3: First Steps With Solaris 11

Figure 3. Reviewing the Installation Log

Installing on Bare Metal as a Standalone System

If you have an x86 system to dedicate to Oracle Solaris 11, this installation process is really the same as installing the OS into a virtual machine.Simply boot the Live Media and start up the graphical installer.

The biggest question with this approach is whether Oracle Solaris 11 has the proper drivers for your hardware devices. If you run the Live Media, youcan easily determine how well your devices are supported. On the desktop of the Live Media, there is an icon for the Device Driver Utility, which isshown in Figure 4. Double­click the icon and wait for the scan to complete.

While booting off the Live Media, the default user login and password is jack. If you need to become the root user, you can use the passwordsolaris. Later, we will discuss more about how the initial user is set up during the Oracle Solaris installation.

Page 4: First Steps With Solaris 11

Figure 4. The Oracle Solaris Device Driver Utility

If drivers are missing, the utility provides pointers on where to look for help. Google is also your friend here, but if you truly hit a dead end, Oracle VMVirtualBox might be a better solution until the driver you need becomes available or until you buy a new system or the components necessary to solvethe driver problems.

If you are trying to install Oracle Solaris 11 onto a SPARC­based system, you will have to use the Interactive Text Installer. Unlike the Live Media, thisinstallation installs a selection of software that is suitable for a server­oriented environment. It does not include a desktop environment. After theinitial installation, you can install a full desktop environment by using the Package Manager to install the solaris­desktop package.

Installing on Bare Metal in a Multiboot Scenario

In a multiboot scenario, you install Oracle Solaris 11 on the bare metal alongside your existing operating system(s). This scenario is the mostcomplicated and requires some preparation.

The Oracle Solaris 11 Live Media includes the GNOME Partition Editor, GParted, which you can use to partition your hard disk. You should create apartition of type Linux swap, which the Oracle Solaris installer will recognize.

If Windows is your existing OS, the Oracle Solaris boot loader will recognize it without difficulty. If Linux is your existing OS, be sure to back up yourGRUB configuration file, because you will need to add its entries to the Oracle Solaris GRUB menu. Consult the Oracle Solaris 11 productdocumentation that is available for these scenarios.

Users

Now that you have Oracle Solaris 11 installed, let's discuss how the privileges assigned to the user ID that you created during installation allow youto administer your system.

If you recall, during installation, you created a user account, as shown in Figure 5.

Page 5: First Steps With Solaris 11

Figure 5. The Oracle Solaris Graphical Installer—Configuring Users

The installer asked you for only a single password, which is used as the password for both the root account and the initial user account. However,the root password is immediately expired, as you'll see if you try to switch to root:

bleonard@solaris:~$ suPassword:su: Password for user 'root' has expiredNew Password:

GUI tools requiring administrator privileges will also prompt you for the root password initially and then explain that the root user has expired and anew password must be provided, as shown in Figure 6:

Figure 6. Prompt for a New root Password

The root Role

If you look at the /etc/passwd file, you will see root defined.

bleonard@solaris:~$ cat /etc/passwd root:x:0:0:Super­User:/root:/usr/bin/bashdaemon:x:1:1::/:bin:x:2:2::/usr/bin:sys:x:3:3::/:adm:x:4:4:Admin:/var/adm:lp:x:71:8:Line Printer Admin:/:

Page 6: First Steps With Solaris 11

...

However, you will be frustrated if you try to log in as root. For security reasons, Oracle Solaris 11 does not define root as a traditional user account.If you look at the /etc/user_attr file, you can see that root is defined as a role, as shown in Listing 1.

Listing 1: Verifying that root Is Defined as a Rolebleonard@solaris:~$ cat /etc/user_attr## The system provided entries are stored in different files# under "/etc/user_attr.d". They should not be copied to this file.## Only local changes should be stored in this file.# This line should be kept in this file or it will be overwritten.#root::::type=rolebleonard::::type=normal;lock_after_retries=no;profiles=System Administrator;roles=root

You can also see that the user ID created by the installer was assigned the root role by default. So, although you cannot log in as root, you canswitch to the root role, which will prompt you for the root password.

Note: When using su, the default user name is root and it is not required, as seen in the earlier example where we changed the default password.

bleonard@solaris:~$ su rootPassword:bleonard@solaris:~#

The sudo Command

In addition to being assigned the root role, the user created at install time is added to the /etc/sudoers file. The /etc/sudoers file is well­documented and you can define very fine­grained rules as to what a particular user is allowed to do. In the case of the user created duringinstallation, the user is allowed to do everything (just as if they were root). Here's what the entry for the user created during installation looks like:

bleonard ALL=(ALL) ALL

The entry above is stating that user bleonard can run any command on any host as any user. For further details on how to fine­tune a user'sprivileges, see the sudoers man page.

So, theoretically, you should never have to switch to the root role to perform privileged operations, for example, to write a file to the root of the filesystem:

bleonard@solaris:~$ touch /file1touch: cannot touch /file1': Permission denied

However, prefixing the same command with sudo gives me the proper privileges necessary to complete the operation:

bleonard@solaris:~$ sudo touch /file1Password:

Note that the password required by sudo is not the root password, but rather your user account password.

The bottom line here is that everything is set up for you "out of the box" with the default installation of Oracle Solaris 11. The user ID you created atinstall time is able to fully administer the system. With the right privileges, you can properly administer your system, such as managing systemservices, which we address in the next section.

Service Management Facility (SMF)

Oracle Solaris 11 manages system services through the Service Management Facility (SMF). Although a GUI is available, the more common andpowerful way to manage services is to use these command­line commands: svcs to report service status and svcadm to manipulate serviceinstances. For example, run svcs to get a list of the currently running services, as shown in Listing 2.

Listing 2: Getting a List of the Currently Running Services

Page 7: First Steps With Solaris 11

bleonard@solaris:~$ svcs |moreSTATE STIME FMRIlegacy_run 1:32:23 lrc:/etc/rc2_d/S47pppdlegacy_run 1:32:23 lrc:/etc/rc2_d/S89PRESERVEdisabled 1:27:02 svc:/network/ipsec/policy:defaultonline 1:23:11 svc:/system/early­manifest­import:defaultonline 1:23:11 svc:/system/svc/restarter:default...online 1:32:29 svc:/system/zones­install:defaultonline 1:32:29 svc:/system/zones:defaultonline 1:32:58 svc:/system/console­reset:defaultonline 1:33:36 svc:/system/ocm:default

SMF has many advantages compared to the old way of using UNIX services through startup scripts. The key advantage is the specification ofmetadata about each service in a manifest file. This allows you to specify dependencies between services, which then enables independentservices to be started in parallel, which speeds up the system boot. Also, when services fail, they can be restarted in the correct order relative to eachother. For example, take a look at the sendmail service, using the ­l option to display all available information, as shown in Listing 3.

Listing 3: Displaying Information About a Service

bleonard@solaris:~$ svcs ­l sendmailfmri svc:/network/smtp:sendmailname sendmail SMTP mail transfer agentenabled truestate onlinenext_state nonestate_time October 5, 2011 01:32:23 AM NZDTlogfile /var/svc/log/network­smtp:sendmail.logrestarter svc:/system/svc/restarter:defaultcontract_id 173manifest /lib/svc/manifest/network/smtp­sendmail.xmldependency require_all/refresh file://localhost/etc/mail/sendmail.cf (online)dependency require_all/refresh file://localhost/etc/nsswitch.conf (online)dependency optional_all/none svc:/system/filesystem/autofs (online)dependency require_all/none svc:/system/filesystem/local (online)dependency require_all/none svc:/network/service (online)dependency require_all/refresh svc:/milestone/name­services (online)dependency optional_all/refresh svc:/system/identity:domain (online)dependency optional_all/none svc:/system/system­log (online)

At the bottom of Listing 3, you can see the services on which sendmail depends. If one of services on which sendmail depends fails to start forsome reason, sendmail will not even attempt to start.

You can also easily disable, enable, and restart services by using the svcadm command. For example, use this command to disable the sendmailservice:

bleonard@solaris:~$ sudo svcadm disable sendmail

Using the ­x option for the svcs command will give you an explanation of the service state:

bleonard@solaris:~$ svcs ­x sendmailsvc:/network/smtp:sendmail (sendmail SMTP mail transfer agent) State: disabled since October 5, 2011 01:52:39 AM NZDTReason: Disabled by an administrator. See: http://sun.com/msg/SMF­8000­05 See: sendmail(1M) See: /var/svc/log/network­smtp:sendmail.logImpact: This service is not running.

Note that this output also provides links to further information about the service state (http://sun.com/msg/SMF­8000­05) and the services log file(/var/svc/log/network­smtp:sendmail.log), both of which can be very useful in tracking down service failures.

Equally, we could also have used the SMF Service Inspector graphical interface from the Administration menu in the desktop panel. This interfaceallows some of the same functionality as the command line, including the ability to disable, refresh, and restart system services and browse logs foreach service instance, as shown in Figure 7.

Page 8: First Steps With Solaris 11

Figure 7. Oracle Solaris SMF Service Inspector

Oracle Solaris 11 is secure by default. What this means is that all nonessential network services are disabled or configured to only listen forconnections from the local system itself, thus reducing the risk of a network­based attack. In fact, only SSH, a service to allow remote logins, isenabled.

Administering the Network

One of the first services that you need to administer is the network. Oracle Solaris 11 uses Network Configuration Profiles (NCPs) to apply networkconfiguration to a system. By default, when using the Live Media, the system uses the Automatic NCP, which automatically tries to connect to anetwork using DHCP. If a wired network is available, it will always connect to this; otherwise, it will try to connect to a wireless network.

The first place to start is the Network Status icon found on the top panel of the desktop. This icon indicates whether you are connected to a wired orwireless network or you are offline, as shown in Figure 8.

Figure 8. Three States of the Network Status Icon

Clicking the icon brings up the Network Preferences dialog box, as shown in Figure 9.

Page 9: First Steps With Solaris 11

Figure 9. Oracle Solaris Network Preferences Dialog Box

From the Network Preferences dialog box, you can see both IP version 4 and version 6 addresses as well as the network speed for the network linkthat has been configured, in this case a wired interface. All network interfaces in Oracle Solaris 11 are assigned vanity identifiers, in this case net0,which no longer reflect what underlying network driver is used. This is a change that is new to Oracle Solaris 11 compared to previous releases.

If you are installing onto a laptop and have wireless networking, you can view the list of wireless networks available by right­clicking the status icon,as shown in Figure 10.

Page 10: First Steps With Solaris 11

Figure 10. Oracle Solaris Wireless Network Options

Network configuration is managed using an SMF service, svc:/network/physical:default, and just like any SMF service, you can view thestatus of the service from the command line, as shown in Listing 4.

Listing 4: Viewing the Status of an SMF Service

bleonard@solaris:~/Desktop$ svcs ­l network/physical:defaultfmri svc:/network/physical:defaultname physical network interface configurationenabled truestate onlinenext_state nonestate_time October 5, 2011 01:26:46 AM NZDTlogfile /var/svc/log/network­physical:default.logrestarter svc:/system/svc/restarter:defaultcontract_id 62manifest /lib/svc/manifest/milestone/config.xmldependency optional_all/none svc:/milestone/config (online)dependency require_all/none svc:/network/ip­interface­management (online)dependency require_all/none svc:/network/datalink­management (online)dependency require_all/none svc:/network/physical:upgrade (online)dependency optional_all/none svc:/network/ipmp (online)dependency require_all/none svc:/network/netcfg (online)dependency optional_all/none svc:/network/install (disabled)dependency require_all/none svc:/system/name­service/upgrade (online)dependency require_all/none svc:/network/loopback (online)dependency optional_all/none svc:/system/manifest­import (online)

If you prefer to manage your network manually, you need to enable the DefaultFixed Network Configuration Profile, as follows:

bleonard@solaris:~$ sudo netadm enable ­p ncp DefaultFixedPassword:Enabling ncp 'DefaultFixed'

Page 11: First Steps With Solaris 11

You will then have full manual control over the network configuration and can proceed to use the administrative commands dladm and ipadm toconfigure your network, as shown in Listing 5.

Listing 5: Manually Administering a Network

bleonard@solaris:~$ dladm show­physLINK MEDIA STATE SPEED DUPLEX DEVICEnet0 Ethernet unknown 1000 full e1000g0bleonard@solaris:~$ ipadm show­ifIFNAME CLASS STATE ACTIVE OVERlo0 loopback ok yes ­­bleonard@solaris:~$ sudo ipadm create­ip net0bleonard@solaris:~$ ipadm show­ifIFNAME CLASS STATE ACTIVE OVERlo0 loopback ok yes ­­net0 ip down no ­­bleonard@solaris:~$ sudo ipadm create­addr ­T static ­a 10.0.2.18/24 net0/v4staticbleonard@solaris:~$ sudo ipadm show­ifIFNAME CLASS STATE ACTIVE OVERlo0 loopback ok yes ­­net0 ip ok yes ­­bleonard@solaris:~$ ipadm show­addrADDROBJ TYPE STATE ADDRlo0/v4 static ok 127.0.0.1/8net0/v4static static ok 10.0.2.18/24lo0/v6 static ok ::1/128

We will not cover manual network configuration, network configuration profiles, or managing naming services in this article. You can read more aboutmanual network configuration in the excellent Oracle Solaris 11 product documentation.

Where Is Everything in Oracle Solaris?

So where is everything in Oracle Solaris 11? The root directory (/)is not hard to understand for those accustomed to Windows operating systems. It'slike the top­level directory on a drive (C:\\). The key difference is that Oracle Solaris provides a single directory hierarchy that starts at /. So, unlikeWindows, there's no need to specify a device (for example, C:\\, D:\\, and so on) when specifying a file name.

Oracle Solaris uses ZFS as the default root file system. ZFS provides the highest levels of data integrity, and it includes many different utilities toallow administrators to perform a variety of tasks, for example, data backup or data encryption.

Table 1 shows various locations available in Oracle Solaris from which to run different commands. These are specified by the value of theenvironmental variable $PATH.

Table 1. Locations and Their Content

Location Content DefaultPath

/usr/bin Nonessential command binaries (not needed in single­user mode); forall users. Yes

/usr/gnu/binGNU versions of popular commands. Where there is no conflict,commands have been included in /usr/bin. Linux users can set/usr/gnu/bin to be in their $PATH at first to have a more familiarexperience.

No

/usr/sbin Nonessential system binaries, for example, daemons for variousnetwork services. Yes

Table 2 shows some additional locations to note in Oracle Solaris 11.

Table 2. More Oracle Solaris 11 Locations and Their ContentLocation Content

/opt Optional application software packages.

/usr/localTertiary hierarchy for local data, specific to this host. Typically, it has furthersubdirectories, for example, /usr/local/bin/, /usr/local/lib/, and/usr/local/share/.

/etc Static system configuration data.

/var Variable files whose content is expected to continually change during normal

Page 12: First Steps With Solaris 11

operation of the system, such as logs, spool files, and temporary e­mail files./home Users' home directories, containing saved files, personal settings, and so on.

The home directories are actually auto­mounted from /export/home. For more information see the Automounted Home Directory blog.

Image Packaging System (IPS)

Because Oracle Solaris 11 is designed to fit on a CD, you might discover that you need to install additional software. A key differentiator from OracleSolaris 10 is the new Image Packaging System (IPS) in Oracle Solaris 11. One of the main goals of the IPS is to provide a network repository­baseddelivery mechanism, which is kind of like an app store. Oracle Solaris comes with one repository preconfigured, and you can easily add more. Fromhere, you can very easily install many other software components that aren't in the default installs, either by using a graphical or command­line client.

An important feature of IPS is automatic software­dependency checking. When you select a package to install, IPS determines all the other requiredpackages that are needed and ensures that these are installed as well. There are a number of group packages that are available to install forcommon selections of software, for example, a desktop environment and a Web AMP stack.

Finding and Installing Packages

You can use either the Package Manager GUI (available from the System > Administration menu), shown in Figure 11, or the command line tomanage the packages.

Figure 11. The Oracle Solaris Package Manager

From the command line, the main command is pkg. The pkg command is always intended to be run with a subcommand, such as list, search,info, or install.

For example, use the pkg list command to see the list of packages currently installed on your system, indicated by an i in the first column of IFO,as shown in Listing 6. An f in the second column indicates that the package is frozen, and an r or o in the third column indicates that package hasbeen renamed or obsoleted.

Listing 6: Determining What Packages Are Installed

bleonard@solaris:~$ pkg listNAME (PUBLISHER) VERSION IFOSUNWcs 0.5.11­0.170 i­rarchiver/gnu­tar 1.26­0.175.0.0.0.0.525 i­­audio/audio­utilities 0.5.11­0.175.0.0.0.0.0 i­­auto_install 0.1­0.166 i­­benchmark/x11perf 1.5.4­0.175.0.0.0.0.1215 i­­codec/flac 1.2.1­0.175.0.0.0.0.0 i­­codec/libtheora 1.1.1­0.175.0.0.0.0.0 i­­

Page 13: First Steps With Solaris 11

codec/ogg­vorbis 2.30.0­0.175.0.0.0.0.0 i­­codec/speex 1.2­0.175.0.0.0.0.0 i­­

To find a package, use the search subcommand. For example, if you are looking for wireshark, a graphical network protocol analyzer, use pkgsearch. The ­p flag restricts the results to the package names only; otherwise the output lists all items in a package that contain the search string,for example, files, directories, links, and so on:

bleonard@solaris:~$ pkg search ­p wiresharkPACKAGE PUBLISHERpkg:/diagnostic/wireshark/wireshark­[email protected]­0.175.0.0.0.0.525 solarispkg:/diagnostic/[email protected]­0.175.0.0.0.0.525 solaris

And then, to get more information on a particular package, use pkg info. The ­r (remote) flag is necessary when querying a package that is notinstalled on the local file system, as shown in Listing 7.

Listing 7: Getting More Information for a Package

bleonard@solaris:~$ pkg info ­r wireshark Name: diagnostic/wireshark Summary: Graphical network protocol analyzer Category: Applications/Internet State: Not installed Publisher: solaris Version: 1.4.8 Build Release: 5.11 Branch: 0.175.0.0.0.0.525Packaging Date: Tue Sep 27 03:33:05 2011 Size: 2.76 MB FMRI: pkg://solaris/diagnostic/[email protected],5.11­0.175.0.0.0.0.525:20110927T033305Z

To see the contents of the wireshark package, use the pkg contents command, as shown in Listing 8. This command is very useful when you'retrying to figure out where a package installed its contents.

Listing 8: Listing the Contents of a Package

bleonard@solaris:~$ pkg contents ­r wiresharkPATHetcetc/securityetc/security/exec_attr.detc/security/exec_attr.d/diagnostic:wiresharkusrusr/sbinusr/sbin/wiresharkusr/shareusr/share/applicationsusr/share/applications/wireshark.desktopusr/share/manusr/share/man/man1usr/share/man/man1/wireshark.1usr/share/pixmapsusr/share/pixmaps/wireshark.png

To see any dependencies that a package might have, you need a slightly more complicated query, shown in Listing 9.

Listing 9: Determining Package Dependencies

bleonard@solaris:~$ pkg contents ­r ­o fmri ­t depend wiresharkFMRIpkg:/diagnostic/wireshark/wireshark­[email protected]­0.175.0.0.0.0.525pkg:/library/desktop/[email protected]­0.173.0.0.0.0.0pkg:/library/desktop/[email protected]­0.173.0.0.0.0.0pkg:/library/[email protected]­0.173.0.0.0.0.0pkg:/library/[email protected]­0.173.0.0.0.0.487pkg:/system/library/[email protected]­0.173.0.0.0.0.487

Page 14: First Steps With Solaris 11

pkg:/system/library/[email protected]­0.172.0.0.0.0.0pkg:/system/[email protected]­0.173.0.0.0.0.17656

In this case, we are outputting the package FMRI (Fault Management Resource Indicator), which is the formal way of describing a package of aspecific version, and we are using the ­t option to specify that we are looking for a package dependency of type depend.

This means that IPS will identify the packages on which wireshark depends and install them if they are not already installed.

Finally, when you are ready to install the package, use the pkg install command, as shown in Listing 10.

Listing 10: Installing a Package

bleonard@solaris:~$ sudo pkg install wireshark Packages to install: 3 Create boot environment: NoCreate backup boot environment: No Services to change: 2

DOWNLOAD PKGS FILES XFER (MB)Completed 3/3 285/285 17.3/17.3

PHASE ACTIONSInstall Phase 379/379

PHASE ITEMSPackage State Update Phase 3/3Image State Update Phase 2/2

PHASE ITEMSReading Existing Index 8/8Indexing Packages 3/3

Note: Only authorized users can install packages to the system, which is why you must prefix the pkg install command with sudo. See the Userssection to review.

Package Repositories

Oracle Solaris 11 comes preconfigured with a single software repository: http://pkg.oracle.com/solaris/release. Oracle also makes the entiresoftware repository available for download so that it can be set up on your internal network if you are in an environment where the network isrestricted, or if you simply want improved performance by having software packages available locally. It is also possible to configure additionalsoftware repositories. Over time, it is expected that third­party software providers will create and publish to their own repositories in addition to themain Oracle Solaris repository.

Besides the default release repository at pkg.oracle.com, Oracle makes available a support repository to those who purchase an Oracle supportcontract. The support repository is updated, on average, once per month with bug fixes and security patches for Oracle Solaris 11. For moreinformation on support, see Oracle Premier Support for Operating Systems.

One­Click Install

You might have noticed the Install link when you were browsing the repositories. Figure 12 shows the Package Catalog, which is a list of allpackages that are available for Oracle Solaris 11.

Page 15: First Steps With Solaris 11

Figure 12. Oracle Solaris Repository View through a Web Browser

Clicking the Install link launches the Package Manager and starts the installation. If the repository hasn't been configured on the system, thenecessary configuration is added before the packages are installed. This is a nice feature, because anyone can promote a package. For example,here's a link to install wireshark. (Note: Unless you're reading this from an Oracle Solaris system, your Web browser will not know what do to withthis link).

Boot Environments

A boot environment (BE) is a clone of the files and file system that are critical to the operation of Oracle Solaris. After installation, there is only asingle boot environment, but over time, new boot environments are created, either manually by you or automatically by the Package Manager.

A boot environment essentially allows you to roll back to an earlier snapshot of Oracle Solaris 11 in case something goes wrong in your current bootenvironment. A boot environment usually consists of the root data set, but it can optionally include other data sets. Some data sets are shared acrossmultiple boot environments, for example, /export. Figure 13 shows the Manage Boot Environments dialog box from the Package Manager.

Page 16: First Steps With Solaris 11

Figure 13. Manage Boot Environments Dialog Box

Before you do anything risky on your system, such as modifying a system configuration file, consider creating a new boot environment to protectyourself in case something goes wrong. You create a new boot environment using the beadm utility. Here's an example of creating a new bootenvironment called be­prior­to­changes.

bleonard@solaris:~$ sudo beadm create be­prior­to­changes

Remembering to use this simple command can be the difference between several hours of downtime trying to recover from your changes and a fewseconds to quickly revert to an older boot environment. So it is recommended that administrators use boot environments as part of their bestpractices for administering an Oracle Solaris 11 system.

Update Manager

When updates to IPS packages are available, Oracle Solaris will notify you by way of an icon in your top panel, as shown in Figure 14.

Figure 14. Oracle Solaris Update Manager Notification Icon

Clicking the icon launches the Update Manager, which then creates a new boot environment and installs the updates, as shown in Figure 15. Theupdated system will be active on your next boot. If anything unexpected happens during a system update, you can safely revert to the older bootenvironment to recover the system.

Page 17: First Steps With Solaris 11

Figure 15. Oracle Solaris Update Manager

Solaris Legacy Package Manager

For many years, the Oracle Solaris operating system has used the SVR4 packaging system, so named because it was part of the System V, Release4 version of UNIX. Oracle Solaris 11 supports the installation of SVR4 packages and includes the commands needed to install and remove thosepackages. Some compatibility has been added to the system to allow any package dependencies declared in an SVR4 package to be satisfied.

You should be careful to heed any warnings printed to the console when installing SVR4 packages to ensure that the package contents don't conflictwith existing files and directories installed using IPS. One nice way to avoid this issue is by taking advantage of Oracle Solaris 10 Zones, compatiblevirtual environments that allow for running legacy applications.

A Final Message

Moving to Oracle Solaris 11 can be exciting. However, it can also be frustrating as you begin to learn your way around. We hope this article has givenyou enough of an introduction to successfully make the move to Oracle Solaris 11.

After you are up and running, you will surely come up with additional questions. An experienced Oracle Solaris community is ready to help. Come joinus in the OTN Discussion Forum: Oracle Solaris 11 for SysAdmins. Generally, you will receive a response within hours. Also, take a look at some ofthe excellent Oracle Solaris 11 how­to guides, which cover some of the more common administrative tasks you will face when deploying applicationson the operating system.

Enjoy your journey with Oracle Solaris 11!

For More Information

Here are some additional resources:

Download Oracle Solaris 11Access Oracle Solaris 11 product documentationAccess all Oracle Solaris 11 how­to guidesLearn more with Oracle Solaris 11 training and supportSee the official Oracle Solaris blogCheck out The Observatory Blog for Oracle Solaris tips and tricks

Revision 1.0, 11/02/2011