section 7 - ips lab

14
7/27/2019 Section 7 - IPS Lab http://slidepdf.com/reader/full/section-7-ips-lab 1/14  Oracle Solaris 11  – Hands On Lab For Oracle employees and authorized partners only. Do not distribute to third parties. © 2011 Oracle Corporation Page 1 IPS Basics  1 Introduction Oracle Solaris 11 takes a new approach to lifecycle and package management to greatly simplify the process of managing system software helping to reduce the inherent risks of operating system maintenance, including reducing unplanned and planned downtime. With the Image Packaging System (IPS), administrators can install and update software from local or remote software package repositories using a more efficient and modernized process. Participants in this lab will gain example-led awareness and understanding of the following technical facilities:  Image Packaging System Basics  IPS command line overview  Configuring repositories  Installing and uninstalling packages  Obtaining information about packages  Searching for packages  Package manifest basics We will go on a brief tour of the new IPS feature and help the learner gain confidence in this new technology to be able to take their expertise to the next step. 2 Overview IPS automates the management of system software on Oracle Solaris 11 by replacing patching with package updates. IPS is an efficient and network-centric approach that includes automatic software dependency checking and validation. IPS builds on the foundation of ZFS and utilizes its powerful snapshot and clone features which help reduce risk by creating instant backups and near instant roll-backs in case issues arise. Using IPS, administrators can easily and reliably install or replicate an exact set of software package versions across many different client machines. Working with IPS involves these simple steps 1) Configuration of the repository, either local or remote, or both 2) Package installation, removal, and updating commands 3) Obtaining information about packages

Upload: sun-gary

Post on 13-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 1/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 1

IPS Basics 

1  Introduction

Oracle Solaris 11 takes a new approach to lifecycle and package management to

greatly simplify the process of managing system software helping to reduce the

inherent risks of operating system maintenance, including reducing unplanned and

planned downtime. With the Image Packaging System (IPS), administrators can

install and update software from local or remote software package repositories

using a more efficient and modernized process.

Participants in this lab will gain example-led awareness and understanding of thefollowing technical facilities:

  Image Packaging System Basics

  IPS command line overview

  Configuring repositories

 

Installing and uninstalling packages

  Obtaining information about packages

  Searching for packages

  Package manifest basics

We will go on a brief tour of the new IPS feature and help the learner gainconfidence in this new technology to be able to take their expertise to the next step.

2 Overview

IPS automates the management of system software on Oracle Solaris 11 by replacing

patching with package updates. IPS is an efficient and network-centric approach

that includes automatic software dependency checking and validation. IPS builds on

the foundation of ZFS and utilizes its powerful snapshot and clone features which

help reduce risk by creating instant backups and near instant roll-backs in case

issues arise. Using IPS, administrators can easily and reliably install or replicate an

exact set of software package versions across many different client machines.

Working with IPS involves these simple steps

1)  Configuration of the repository, either local or remote, or both

2) 

Package installation, removal, and updating commands

3)  Obtaining information about packages

Page 2: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 2/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 2

4)  Automating package installation

This lab builds on the foundation already laid in the Module 4 Lab – Advanced

Installation. We have already covered some of the basics of AI, the repository, and

package management so some of this will be a refresher. We will utilize the Virtual

Box Oracle Solaris 11 Text based image that we installed for Mod 4 – AdvancedInstallation. And we will use the pre-installed repository that we added for that

module as well.

For instructions on downloading and installing the Oracle Solaris 11 Text based

image and the Oracle Solaris 11/11 Repository image, please see the Mod 4 – 

Advanced Installation lab.

3 Pre-requisites

This lab requires the use of the following elements:

 

A current laptop with at least 2GB memory and 100GB free disk space

  Oracle VirtualBox Software (4.0.16 with Extension Pack installed)

  Oracle Solaris 11 11/11 Base Text Image (sol-11-1111-text-x86.iso)

  Oracle Solaris IPS Repository (sol-11-1111-repo-full.iso)

The following assumptions have been made regarding the environment where this

lab is being performed:

1.  Network connectivity to the Internet is not necessary

2. 

The ‘server’ system will be configured with a static IP address that will act asa DHCP server.

3. 

The VM Instance name is ‘AIserver’  4.  The repository has already been configured with the parameters laid out in

Mod 4 – Advanced Installation

Page 3: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 3/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 3

4 Exercises

4.1  Oracle VirtualBox Hypervisor Software overview

Your system should alreadyhave Oracle VirtualBoxhypervisor software

installed and ready to usewith the AIServer instance

available.

When you boot yourAIServer instance in the

VirtualBox application your

GRUB boot menu may or

may not look like this.

Choose the existing

‘solaris11’ instance to begin

working with the lab.

After logging in a ‘labuser’and su’ing to ‘root’. Verify

that the publisher is still setto our internal repository of

http://192.168.1.222

Page 4: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 4/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 4

4.2  Repository basics

  Software developers, or publishers, make their software available insoftware package repositories from which administrators can install to their

systems.  Oracle Solaris 11 installations are configured to have a default publisher,

Solaris, which supplies software packages from the "release" repository:http://pkg.oracle.com/solaris/release.

 

Administrators can install new software packages, search for package

content, or mirror the contents of this repository locally.

  While many IPS commands that query the system (list, info, contents, search,

history) can be performed by any user, commands that make changes to the

system image must be performed by adopting an appropriate administrative

role.

Administrators can quickly see what configuration a system has by using the pkgpublisher command:

# pkg publisher

We can quickly query some basic information about this repository using thepkgrepo info command, or they can load the repository URL into their Web browser:

# pkgrepo info –s http://192.168.1.222

You can see that our repository currently has 4292 packages, is online, and was last

updated on October, 26th of 2011.

4.3  Installing and uninstalling packages

Now that we’ve confirmed the repository let’s review installation of packages. 

First we’ll investigate installing the GNU GCC compiler by doing a ‘dry-run’

Page 5: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 5/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 5

installation using the ‘nv’ switch. 

# pkg install –nv gcc-3

For a dry run (no changes have been made to the system), we used the –nv switch.

We learn from this output that this package … 

  Will install one package

  Will take up about 176 megabytes of space

  Doesn’t create a new boot environment  

  Doesn’t create a backup boot environment  

  Changes a single service

 

Will restart the svc:/application/texinfo-update:default 

service

Let’s go ahead and install this package.  

# pkg install gcc-3

Page 6: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 6/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 6

Our package has been installed.

Verify that the gcc-3 package has been installed.

# pkg info gcc-3

Note the other information available such as the description, state, publisher,

version, build release, etc.

Even if a package doesn’t require a new boot environment or at least a backup, you

can create one yourself on installation of any package using the below command.

Let’s uninstall gcc-3 and try again in a new boot environment.

# pkg uninstall gcc-3

# pkg install –-be-name gcc-be gcc-3

Page 7: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 7/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 7

Note: In the above output, the ‘Create boot environment:’ field now says ‘Yes’. Also

the screen informs us that the clone has been updated, activated, and will be the

default boot environment on next boot.

Confirm this with the beadm command:

# beadm list

Set the active boot environment back to our default ‘solaris11’ instance. 

Note:  Your instance could have another name. Just use the default solaris instancethat you left intact from the last lab.

# beadm activate solaris11

# beadm list

Page 8: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 8/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 8

This lab has attempted to illustrate how easy it is to create backup boot

environments. It’s recommended that systems administrators use them as their day

to day best practices when administering and maintaining systems.

4.4  Getting information about a package

IPS makes it easy to get information about installed packages, whether updates are

available, and many other details about installed and not installed packages. The

first command we’ll review is the ‘pkg list’ command. 

The pkg list command will return every package on the system. You can limit the

output by typing the name of an existing package.

# pkg list

# pkg list text/groff

The output above shows us the tail end of the ‘pkg list’ command with no

arguments. It basically lists out every package on the system. The second package

list command we give with a specific package to show the information that can be

obtained from the command. The columns will list the name, version and an IFO

column.

There is also an IFO column which tell us … 

  An ‘i’ in the I column indicates the package is installed

  An ‘f’ in the F column indicates that the package is frozen 

  An ‘o’ in the O column indicates that this package is obsolete 

  An ‘r’ in the O column indicates the package is available under a new name  

For example:

Page 9: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 9/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 9

# pkg list –af *toolkit@latest

The ‘-af’ option lists all matching packages, including those that can’t be installed in

this image. @latest lists only the newest packages. This output indicates that … 

  The developer/dtrace/toolkit package cannot be installed in this image.

  The “r” in the O column indicates that this package has been renamed. Thedeveloper/dtrace/toolkit package has been renamed to

system/dtrace/dtrace-toolkit,

  system/dtrace/dtrace-toolkit is already installed.

 

And nothing in the columns for nvidia/cg-toolkit indicates it’s not installedon our system

Let’s get some more information about a package.

# pkg info system/dtrace/dtrace-toolkit

If we try to find information on packages that aren’t installed on our system we

won’t get any results. Use the ‘-r’ option to query the Repository to get information

on uninstalled packages.

# pkg info –r nvidia/cg-toolkit

Page 10: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 10/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 10

To list the contents of the package and the paths and files that will be installed.

# pkg contents gzip

Another powerful feature of IPS is the ability to search for specific things about thepackages, like the name of a package that a file might belong to. Use the command

below to search the repository for a file called stdio.h and the output will tell you

Page 11: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 11/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 11

which applications the file belongs to.

# pkg search stdio.h

4.5  Updating the system

Oracle Solaris 11 IPS technology includes the ability to update your system to the

latest packages with a single command.

To get the latest updates for the entire system at one time you can issue the pkg

update command. Use the ‘- nv’ option for a dry run to get an idea how much work

needs to be done.

# pkg update –nv

You can also update specific packages by specifying them on the command line.

# pkg update vim@latest

Our lab environments are very up to date so we won’t encounter any updates duringthe lab.

If you need to back an update out you’d use the revert command.  

# pkg revert vim

Page 12: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 12/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 12

4.6  Package dependencies

In the SVR4 package environment package dependencies usually had to be managed

manually through readme files and in some cases this made package management

very challenging.

In Oracle Solaris 11, IPS manages dependencies automatically. Below is a table

showing the relationships that IPS manages.

Dependency Description

require  This dependency is required. A package cannot be installed if any of its required dependenciescannot be satisfied.

optional  If this dependency is present on the system already then it must be at a specified version level

or greater.

exclude  This dependency enforces a restriction such that a package cannot be installed if the specifiedpackage is present at the specified version level or greater.

incorporate  This dependency is optional, but the version range has both a lower and an upper bound,allowing only further dot-separated integers to be added to the existing sequences.

conditional  This dependency is required only if another predicate package is installed on the system. This is

often used to allow packages to provide support for features (such as X11 or language bindings)only if the features are already present on the system.

group  This dependency is required unless the package is on the avoid list, in which case, the system

will try to avoid installing this package. However, if another package requires this dependency,it will be installed regardless of whether it is on the avoid list.

parent  This dependency is used to ensure that global zones and non-global zones are kept in sync forall kernel components and any software that spans the zone boundary.

We can see how these relationships are managed by taking a look at the manifest of

a particular package through the pkg command. A package manifest describes how

a package is assembled and provides basic information about the package (such as

Page 13: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 13/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

not distribute to third parties.

© 2011 Oracle Corporation

Page 13

the name, version, description, categorization, and so on), what files the packageincludes, and what other packages or services the package relies on to meet its

dependencies. While many package commands filter this information into a

presentable form, it is sometimes useful to look at the package manifest directly

using the ‘pkg contents –m’ command.

Each line within the manifest is called an action. Actions describe a small part of the

overall package. The first part of each line describes the action type: set, license,

depend, dir, file, and so on. Let’s take a look at an example of the package manifest

using the ‘grep’ command on the ‘gzip’ package. 

Take a look at variables that are set on installation of the gzip package.

# pkg contents –m gzip | grep set

Here we’ll take a look at the dependencies of the gzip package. You can see that it

depends on library and bash.

# pkg contents –m gzip | grep depend

We’ll take a closer look at manifests in another lab

5 Lab Summary

In this document you practiced some package management commands and learned

how to administer packages in Oracle Solaris 11. We did some basic repository

configuration as a follow up to one of the earlier labs. We also installed and

uninstalled packages and practiced obtaining detailed information about packages.

The Oracle Solaris 11 Image Packaging System is a major advancement in

Page 14: Section 7 - IPS Lab

7/27/2019 Section 7 - IPS Lab

http://slidepdf.com/reader/full/section-7-ips-lab 14/14

 

Oracle Solaris 11  – Hands On Lab

For Oracle employees and authorized partners only. Do

software management providing an integrated user experience and improved safetyfor system updates. IPS takes much of the complexity out of managing Oracle Solaris

by providing improved automation and auditing, allowing administrators to flexibly

manage multiple application environments across virtualized and non-virtualized

instances of the operating system.

6 For more information

For more information and next steps, please consult additional resources: Click the

hyperlinks to access the resource.

Transitioning from Oracle Solaris 10 JumpStart to Oracle Solaris 11 Automated Installer 

Oracle Solaris 11 Information Library 

Oracle Solaris 11 Product Documentation 

Advanced Administration with the Image Packaging System on Oracle Solaris 11

Image Packaging System on Oracle Solaris 11

Oracle Solaris 11 IPS Cheat Sheet