当前位置:   article > 正文

oracle update范例,Oracle Solaris 11 的示例更新情景

oracle solaris 11.1

Oracle Solaris 11 的示例更新情景

本部分说明了以下 Oracle Solaris 11 示例更新情景。如果您没有支持合同,则仅示例 2 适用。

示例 1:从 Oracle Solaris 11 支持系统信息库将 Oracle Solaris 11.1 引导映像更新至最新的 SRU

此示例显示了在您具有 Oracle Solaris 11 支持合同的情况下从 Oracle Solaris 11 支持系统信息库将系统从 Oracle Solaris 11.1 升级至最新 SRU 的终端会话。系统的缺省发布者已配置为指向 Oracle Solaris 11 支持系统信息库。有关如何执行此操作的详细信息,请参见示例 3:将 sunpro-incorporation 与 Oracle Solaris 11 支持系统信息库中的最新 SRU 同步。

终端会话显示了以下内容:

列出当前已安装的 entire 和 sunpro-incorporation 软件包版本。输出反映了在 Oracle Solaris 11.1 中最初提供的版本。

列出 Oracle Solaris 11 支持系统信息库中这两个软件包的所有可用版本。输出显示两个软件包都存在更新的版本,这反映了最新的 Oracle Solaris 11.2 SRU。

将系统更新至最新的 Oracle Solaris 11.2 SRU。这是一项非常耗时的更新,因为它在更新时将包括为 Oracle Solaris 11.1 和 Oracle Solaris 11.2 提供的所有 SRU。会话显示在新的命名引导环境中更新了系统,当前的引导环境保持不变。

尽管这里没有显示,但是在安装其中一个 Oracle S11.1 SRU 提供的软件包时系统会报告一些可恢复的错误。可以放心地忽略这些错误消息,如 Oracle Solaris 11.2 信息库中的Oracle Solaris 11.2 发行说明所述。

root@x86box:~# beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.1_example NR / 47.67G static 2014-09-15 09:14

root@x86box:~# pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.1.0.0.24.2 i--

root@x86box:~# pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.1.0.0.19.0 i--

root@x86box:~# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F https://pkg.oracle.com/solaris/support/

root@x86box:~# pkg list -af entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.2.0.5.0 ---

entire 0.5.11-0.175.2.1.0.5.0 ---

entire 0.5.11-0.175.2.0.0.42.0 ---

entire 0.5.11-0.175.1.21.0.4.1 ---

entire 0.5.11-0.175.1.20.0.5.0 ---

...

entire 0.5.11-0.175.1.0.0.24.2 ---

...

root@x86box:~# pkg list -af sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 ---

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.0.0.37.0 ---

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.1.19.0.4.0 ---

...

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.1.0.0.19.0 i--

...

root@x86box:~# pkg update --accept --be-name s11.1_example_s11.2sru02

------------------------------------------------------------

Package: pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.175.2.2.0.5.2:20140904T200410Z

License: lic_OTN

...

Packages to remove: 7

Packages to install: 90

Packages to update: 498

Mediators to change: 2

Create boot environment: Yes

Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED

Completed 595/595 40141/40141 872.6/872.6 1.2M/s

PHASE ITEMS

Removing old actions 7707/7707

Installing new actions 29119/29119

...

Updating modified actions 30920/30920

Updating package state database Done

Updating package cache 505/505

Updating image state Done

Creating fast lookup database Done

A clone of s11.1_example exists and has been updated and activated.

On the next boot the Boot Environment s11.1_example_s11.2sru02 will be

mounted on '/'. Reboot when ready to switch to this updated BE.

---------------------------------------------------------------------------

NOTE: Please review release notes posted at:

http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SERNS

---------------------------------------------------------------------------

root@x86box:~# beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.1_example N / 9.80M static 2014-09-15 09:14

s11.1_example_s11.2sru02 R - 53.74G static 2014-09-15 09:59

root@x86box:~# reboot

Connection to x86box.example.com closed by remote host.

Connection to x86box.example.com closed.

重新引导系统后,以普通用户身份登录并验证 entire 和 sunpro-incorporation 软件包是否都已更新:

...

Oracle Corporation SunOS 5.11 11.2 August 2014

(x86box)% beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.1_example - - 12.35M static 2014-09-15 09:14

s11.1_example_s11.2sru02 NR / 53.99G static 2014-09-15 09:59

(x86box)% pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.2.0.5.0 i--

(x86box)% pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 i--

(x86box)%

注 -

要将系统更新至 S11.2 SRU1,可以将上面示例中的 pkg update 命令更改为:

root@x86box:~# pkg update --accept --be-name s11.1_example_s11.2sru01 entire@0.5.11,0.5.11-0.175.2.1

示例 2:从 Oracle Solaris 11 发行版系统信息库更新 sunpro-incorporation 软件包

在此示例中,系统被从 Oracle Solaris 11 发行版系统信息库更新至 Oracle Solaris 11.2。此示例显示发行版系统信息库存在 sunpro-incorporation 软件包的更新版本,高于通常由 pkg install 从发行版系统信息库安装的版本。

终端会话显示了以下任务:

验证:

系统缺省发布者指向 Oracle Solaris 11 发行版系统信息库

系统 entire 软件包版本为 Oracle Solaris 11.2 内部版本 42

系统 sunpro-incorporation 软件包版本为 Oracle Solaris 11.2 内部版本 37

Oracle Solaris 11 发行版系统信息库包含更新版本的 sunpro-incorporation。

解锁 sunpro-incorporation 软件包。解锁 sunpro-incorporation 软件包后,pkg update 可以安装该软件包的更新版本。

从 Oracle Solaris 11 发行版系统信息库更新 sunpro-incorporation 软件包以创建新的引导映像

重新引导新的引导映像

root@x86box:~# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F http://pkg.oracle.com/solaris/release/

root@x86box:~# pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.0.0.42.0 i--

root@x86box:~# pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.0.0.37.0 i--

root@x86box:~# pkg list -af sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 ---

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.0.0.37.0 i--

root@x86box:~# pkg facet

FACET VALUE SRC

root@x86box:~# pkg change-facet facet.version-lock.consolidation/sunpro/sunpro-incorporation=false

Packages to change: 1

Variants/Facets to change: 1

Create boot environment: No

Create backup boot environment: Yes

PHASE ITEMS

Removing old actions 1/1

Updating package state database Done

Updating package cache 0/0

Updating image state Done

Creating fast lookup database Done

Updating package cache 1/1

root@x86box:~# pkg update -nv sunpro-incorporation

Packages to update: 6

Estimated space available: 49.37 GB

Estimated space to be consumed: 57.27 MB

Create boot environment: No

Create backup boot environment: Yes

Rebuild boot archive: No

Changed packages:

solaris

consolidation/sunpro/sunpro-incorporation

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130238Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200719Z

developer/assembler

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130241Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200720Z

system/library/c++-runtime

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130401Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200722Z

system/library/math

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130409Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200728Z

system/library/mmheap

0.5.11,5.11-0.175.2.0.0.23.0:20130916T153150Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200732Z

system/library/openmp

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130412Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200733Z

root@x86box:~# pkg update --be-name s11.2_plus_studio12.4_runtime -v sunpro-incorporation

Packages to update: 6

Estimated space available: 49.37 GB

Estimated space to be consumed: 57.27 MB

Create boot environment: Yes

Activate boot environment: Yes

Create backup boot environment: No

Rebuild boot archive: No

Changed packages:

solaris

consolidation/sunpro/sunpro-incorporation

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130238Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200719Z

developer/assembler

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130241Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200720Z

system/library/c++-runtime

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130401Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200722Z

system/library/math

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130409Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200728Z

system/library/mmheap

0.5.11,5.11-0.175.2.0.0.23.0:20130916T153150Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200732Z

system/library/openmp

0.5.11,5.11-0.175.2.0.0.37.0:20140414T130412Z -> 0.5.11,5.11-0.175.2.1.0.4.0:20140728T200733Z

DOWNLOAD PKGS FILES XFER (MB) SPEED

Completed 6/6 46/46 3.1/3.1 6.5M/s

PHASE ITEMS

Removing old actions 21/21

Installing new actions 27/27

Updating modified actions 33/33

Updating package state database Done

Updating package cache 6/6

Updating image state Done

Creating fast lookup database Done

Updating package cache 1/1

A clone of s11.2_42 exists and has been updated and activated.

On the next boot the Boot Environment s11.2_plus_studio12.4_runtime will be

mounted on '/'. Reboot when ready to switch to this updated BE.

Updating package cache 1/1

root@x86box:~# reboot

Connection to x86box.example.com closed by remote host.

Connection to x86box.example.com closed.

以普通用户身份执行以下命令以验证:

sunpro-incorporation 软件包已解锁。

sunpro-incorporation 软件包及其包含的软件包之一都已更新至版本 0.5.11-0.175.2.1.0.4.0。

系统的其余部分仍为版本 0.5.11-0.175.2.0.0.42.0,与 Oracle Solaris 11.2 中相同。

(x86box)% pkg facet

FACET VALUE SRC

facet.version-lock.consolidation/sunpro/sunpro-incorporation False local

(x86box)% pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.0.0.42.0 i--

(x86box)% pkg list -af sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 i--

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.0.0.37.0 ---

(x86box)% pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 i--

(x86box)% pkg list system/library/openmp

NAME (PUBLISHER) VERSION IFO

system/library/openmp 0.5.11-0.175.2.1.0.4.0 i--

(x86box)%

示例 3:将 sunpro-incorporation 与 Oracle Solaris 11 支持系统信息库中的最新 SRU 同步

注 -

只有在以下情况下才需要执行此操作:您之前解锁并从 Oracle Solaris 11 发行版系统信息库更新了 sunpro-incorporation 软件包,然后获得了支持合同并具有 Oracle Solaris 11 支持系统信息库的访问权限。

此示例假设 Oracle Solaris 11 支持系统信息库的密钥和证书已复制至 /var/pkg/ssl 目录,如 Oracle 技术网上的文章 How to Update Oracle Solaris 11 Systems From Oracle Support Repositories(如何从 Oracle 支持系统信息库更新 Oracle Solaris 11 系统)中所述。

终端会话显示了如何执行以下任务:

如文章中所述,使用密钥和证书将系统的缺省发布者配置为指向 Oracle Solaris 11 支持系统信息库 https://pkg.oracle.com/solaris/support。

将系统更新至最新的 Oracle Solaris 11.2 SRU。

在将系统更新至最新的 Oracle Solaris 11 SRU 后,重新锁定 sunpro-incorporation 软件包。

请注意,如果 sunpro-incorporation 软件包已解锁并从发行版系统信息库进行了更新,则系统依然可以更新至 Oracle Solaris 11.2 SRU,如之前的示例中所述。

sunpro-incorporation 软件包只有在版本与系统的其余部分保持同步的情况下才可以锁定。在此示例中,在重新锁定软件包之前更新了系统。

(x86box)% beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.2_42 - - 9.26M static 2014-09-02 18:10

s11.2_plus_ss12.4_rtlibs NR / 45.89G static 2014-09-09 17:09

(x86box)% pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.0.0.42.0 i--

(x86box)% pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 i--

(x86box)% su - root

Password:

...

root@x86box:~# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F http://pkg.oracle.com/solaris/release/

root@x86box:~# ls -l /var/pkg/ssl

total 6

-rw-r--r-- 1 root root 786 Sep 9 15:44 pkg.oracle.com.key.certificate.pem

-rw-r--r-- 1 root root 887 Sep 9 15:44 pkg.oracle.com.key.pem

root@x86box:~# pkg set-publisher \

> -k /var/pkg/ssl/pkg.oracle.com.key.pem \

> -c /var/pkg/ssl/pkg.oracle.com.key.certificate.pem \

> -g https://pkg.oracle.com/solaris/support/ \

> -G http://pkg.oracle.com/solaris/release/ solaris

root@x86box:~#

root@x86box:~# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F https://pkg.oracle.com/solaris/support/

root@x86box:~# beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.2_42 - - 9.26M static 2014-09-02 18:10

s11.2_plus_ss12.4_rtlibs NR / 46.00G static 2014-09-09 17:09

root@x86box:~# pkg update --accept --be-name s11.2_sru01 entire

Packages to remove: 1

Packages to update: 63

Create boot environment: Yes

Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED

Completed 64/64 3548/3548 228.4/228.4 1.5M/s

PHASE ITEMS

Removing old actions 475/475

Installing new actions 522/522

Updating modified actions 4272/4272

Updating package state database Done

Updating package cache 64/64

Updating image state Done

Creating fast lookup database Done

Updating package cache 1/1

A clone of s11.2_plus_ss12.4_rtlibs exists and has been updated and activated.

On the next boot the Boot Environment s11.2_sru01 will be

mounted on '/'. Reboot when ready to switch to this updated BE.

Updating package cache 1/1

root@x86box:~# beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.2_42 - - 9.26M static 2014-09-02 18:10

s11.2_plus_ss12.4_rtlibs N / 376.0K static 2014-09-09 17:09

s11.2_sru01 R - 47.72G static 2014-09-09 17:29

root@x86box:~# reboot

Connection to x86box.example.com closed by remote host.

Connection to x86box.example.com closed.

...

终端会话显示了如何以普通用户身份验证以下内容:

系统已更新至 Oracle Solaris 11.2 SRU 1。

sunpro-incorporation 软件包仍保持为之前从 Oracle Solaris 11 发行版系统信息库更新的版本。

(x86box)% beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.2_42 - - 9.26M static 2014-09-02 18:10

s11.2_plus_ss12.4_rtlibs - - 10.15M static 2014-09-09 17:09

s11.2_sru01 NR / 47.83G static 2014-09-09 17:29

(x86box)% pkg list entire

NAME (PUBLISHER) VERSION IFO

entire 0.5.11-0.175.2.1.0.5.0 i--

(x86box)% pkg list sunpro-incorporation

NAME (PUBLISHER) VERSION IFO

consolidation/sunpro/sunpro-incorporation 0.5.11-0.175.2.1.0.4.0 i--

现在系统 entire 软件包已更新,sunpro-incorporation 软件包与系统的其余部分保持同步。

终端会话显示了 root 用户如何锁定 sunpro-incorporation 软件包以与系统其余部分保持同步。

(x86box)% su - root

Password:

...

root@x86box:~# pkg facet

FACET VALUE SRC

facet.version-lock.consolidation/sunpro/sunpro-incorporation False local

root@x86box:~# pkg change-facet facet.version-lock.consolidation/sunpro/sunpro-incorporation=true

Packages to change: 1

Variants/Facets to change: 1

Create boot environment: No

Create backup boot environment: Yes

PHASE ITEMS

Installing new actions 1/1

Updating package state database Done

Updating package cache 0/0

Updating image state Done

Creating fast lookup database Done

Updating package cache 1/1

root@x86box:~# beadm list

BE Active Mountpoint Space Policy Created

-- ------ ---------- ----- ------ -------

s11.2_42 - - 9.26M static 2014-09-02 18:10

s11.2_plus_ss12.4_rtlibs - - 10.15M static 2014-09-09 17:09

s11.2_sru01 NR / 48.00G static 2014-09-09 17:29

s11.2_sru01-backup-1 - - 100.0K static 2014-09-10 12:41

root@x86box:~# pkg facet

FACET VALUE SRC

facet.version-lock.consolidation/sunpro/sunpro-incorporation True local

root@x86box:~#

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号