5.11 中的 uname 和 Solaris 版本

5.11 中的 uname 和 Solaris 版本

我正在尝试将在 Solaris 5.10 下运行的一些脚本改编为 5.11。 Solaris 改变了他们的操作系统升级方法,并且您不再安装单独的补丁。该脚本显示版本号,以便现场人员可以确保他们拥有正确的操作系统版本。

在 5.10 中,uname 如下所示:

> uname -a
SunOS inez 5.10 Generic_138888-07 sun4u sparc SUNW,UltraAX-i2 Solaris

其中138888是集群版本,07是Jumbo补丁版本。这些版本在 Solaris 5.11 中有什么意义吗?

 > uname -a
SunOS sh-sparc-t6320-bl0 5.11 11.2 sun4v sparc SUNW,Sun-Blade-T6320 Solaris

11.2 会被视为“Jumbo 版本”吗?

答案1

如果您运行的是 Solaris 11 或更高版本,正确的做法 (tm) 是使用“pkg info”的输出来查找您感兴趣的软件包。

对于您提到的用例,该包最有可能是“core-os”。您可以从输出中提取各种信息:

$ pkg info core-os
      Name: system/core-os
   Summary: Core Solaris
Description: Operating system core utilities, daemons, and configuration
            files.
  Category: System/Core
     State: Installed
 Publisher: solaris
   Version: 0.5.11
Build Release: 5.11
    Branch: 0.175.2.0.0.42.2
Packaging Date: Tue Jun 24 18:49:27 2014
      Size: 31.41 MB
      FMRI: pkg://solaris/system/[email protected],5.11-0.175.2.0.0.42.2:20140624T184927Z

另一件需要检查的重要事情是“整个”合并。

此时,您去阅读 oracle.com 上提供的有关 11、11.1 和 11.2 版本打包的信息将会非常非常有用。我建议从http://www.oracle.com/us/products/servers-storage/solaris/solaris11/resources/index.html并点击链接。

哦,最后 - 您问“11.2 是否可以被视为 Jumbo 版本?” - 答案是否定的,事实并非如此。

答案2

在 Solaris 11 中,SRU 大约是 Cluster/Jumbo Patch 的最佳等效项。所以你可以运行:

#  pkg info entire | grep Summary
   Summary: entire incorporation including Support Repository Update (Oracle Solaris 11.2.8.4.0).

或者稍微清理一下:

# pkg info entire | grep Summary | sed 's/.*[\(]\(.*\)[\)]./\1/' | awk '{print $NF}'
11.2.8.4.0

Oracle 的 Gerry Haskins 有一个关于补丁的精彩博客@ https://blogs.oracle.com/patch/补丁角

相关内容