Solaris 11配置IPS安装系统包(类似linux中的yum源)

参考:http://blog.chinaunix.net/uid-8860-id-3777457.html

一、  概述:

Solaris 11被称为第一个云操作系统,因此在很多方面体现了云系统的一些特点,在程序包管理方面,Solaris 11做了很大的修改,原有的一些方式方法都已经不再适用一些新的内容了。

Solaris 11的软件分发采用IPSImage Packaging System)方式进行分发,IPS里面存放了所有的Solaris11支持的软件包,软件包存放在叫repositories的库里面,通过publisher来进行发布,一般来说,操作系统安装完毕,缺省情况下IPS的分布包指向为ORACLE网站的更新release:

http://pkg.oracle.com/solaris/release 
     完整文档可参考我豆丁文档:http://www.docin.com/p1-671236987.html

二、  如何创建本地IPS

目前Solaris 11采用IPS的方式来分发软件,补丁程序也是通过SRU的方式来进行更新,不再出类似Solaris 10及以前的形式的补丁号和补丁集了,因此,Solaris 11下所有软件包的更新都必须使用IPS

安装Solaris 11使用的txt光盘,在初始化安装的时候,只安装了kernel以及比较核心和常用的软件,其他软件一概不安装,如果需要安装就须通过IPS进行操作系统的更新。

如果需要创建IPS,必须在oracle网站下载repo的文件,以下为SPARCX86合并的一个repo文件两个下载部分连接:

http://download.oracle.com/otn/solaris/11_1/sol-11_1-repo-full.iso-a

http://download.oracle.com/otn/solaris/11_1/sol-11_1-repo-full.iso-b

下载后把这两个文件ftp到系统里面,放在诸如/opt/sun/os目录下,使用以下命令将这个两个文件合并成一个完整的ISO文件:

# cd /opt/sun/os

# cat sol-11_1-repo-full.iso-a sol-11_1-repo-full.iso-b > sol-11_1-repo-full.iso

创建IPS有两个方法,第一个方法就是直接使用ISO文件,第二方法使用拷贝的方法。

1.   直接ISO文件方法

如果直接使用ISO文件方法,对客户来说,这只是一个临时的方法,除非使用相关脚本来设置,使得机器reboot后仍然能够使用。

# lofiadm -a /opt/sun/os/sol-11_1-repo-full.iso(创建lofi设备/dev/lofi/1)

# mkdir /repo

# mount –F hsfs /dev/lofi/1 /repo

# pkg set-publisher –g file:///repo/repo solaris(直接发布IPS软件包)

此时,IPS发布完毕,可以使用pkg publisher命令查看发布信息,结果和以下信息类似:

# pkg publisher

PUBLISHER                   TYPE     STATUS P LOCATION

solaris                     origin   online F file:///repon/repo/

 

至此就可以使用pkg install来进行软件的安装了,比如pkg install soalris-desktop来安装Solaris 11的图形界面程序了。也可以使用pkg list|grep solaris-desktop命令来查看相关软件信息了,比如pkg list solaris-desktop输出如下:

# pkg list solaris-desktop

NAME (PUBLISHER)                                  VERSION                    IFO

group/system/solaris-desktop                      0.5.11-0.175.1.0.0.24.3    i—

 

2.   第二种创建本地IPS的方法

Solaris 11系统中创建永久的和性能较好的IPS,可以采用第二种拷贝的方法。

IPS支持两种类型的repositoryoriginmirror方式。origin方法里面包含了repository的所有数据,比如catalogs,manifestssearch indexes,是一种性能比较好和安全性较高的存放方法,而mirror方法存放的repository里面只包含了文件。

a.   创建zfs文件系统

# zfs create rpool/export/repoSolaris11

# zfs set atime=off rpool/export/repoSolaris11(atime关闭,主要是为了获取高性能)

b.   原始文件访问设置

IPS的源文件即为sol-11_1-repo-full.iso,假设ISO文件mount到了/reposource目录下,将ISO文件的所有内容拷贝到上面步骤中创建的zfs文件系统中。

# lofiadm –a /opt/sun/os/ sol-11_1-repo-full.iso(产生/dev/lofi/1文件)

# mount –F hsfs /dev/lofi/1 /reposource

# rsync -aP /reposource /export/repoSolaris11

(rysnc命令主要可以支持增量拷贝,如果是一个全新的目录,该命令和tar功效一样)

使用tar命令来拷贝方法如下:

# cd /resposource; tar cf - . |(cd /export/repoSolaris11; tar xf -)

拷贝完毕文件后,就可以创建search的索引了,方法如下:

# pkgrepo -s /export/repoSolaris11 refresh

至此就可以使用pkg set-publisher来进行发布了,根据不同的使用目的,可以采用不同的发布方法,以下主要介绍NFSHTTP的方法。

三、  IPS发布方法介绍

IPS只有分布给系统后,才能进行软件包的安装和系统软件包的updateIPS的发布方法根据不同的需求有多种方法相适应之。如果用local方式的话,那么每台主机系统都需要进行IPS包的下载和分布,这样会造成网络上大量数据的传输,管理员需要花费大量的时间进行数据的拷贝和传输,造成了管理上的不方便,也使得云操作系统优势无法尽情发挥。

1.   采用NFS方式分布

该方法只要在一台主机系统上进行IPS包的部署,然后其他各主机通过NFS的方式进行软件包的获取和升级更新,部署的方法可以参考以上的创建local IPS方法的第二种方法,只是创建ZFS文件系统时候需要打开NFS,具体方法如下:

# zfs create rpool/export/repoSolaris11

一般solaris 11操作系统采用zfs封装系统盘,如果采用ufs的话,zfs create需要制定rpool名字以及磁盘等信息。

# zfs set share=name=solaris11repo,path=/export/repoSolaris11,prot=nfs rpool/export/repoSolaris11

注意zfs set share=name=solaris11repo只能在Solaris 11上使用,在10的任何版本不支持。

# zfs set sharenfs=on rpool/repoSolaris11

# pkg set-publisher -G * -M * -g /net/`hostname `/export/repoSolaris11/ solaris

该发布取消所有原有的originmirrorpublisher,增加新的一个origin的分布内容。

其他主机系统使用nfs发布来更新的方法就比较省时和简单了,只需要将文件系统mount到本地,然后直接发布和更新就可以了,实际上就是省掉了文件的拷贝过程:

首先,将远程nfs文件系统mount到本地,dfshares 远程主机名可以看到share出来的路径,假设将nfs mount到本地的/solaris11reo(没有该mount pointmkdir创建之),最后一步就是直接分布即可,pkg set-publisher –g /solaris11repo(如果本机有其他发布,就使用-G -Moption将其他发布remove掉),此时就可以使用pkg命令进行安装软件包和更新系统了。

2.   采用http方式发布

在创建本地local IPS发布的基础上,通过网络,也可以采用http的方式将IPS包发布到网络里所有的其他solaris 11系统主机。Solaris 11带有一个pkg/serverweb服务程序应用包,首先将应用enable起来,系统将运行pkg.deportd进程来提供服务:

# svccfg -s application/pkg/server setprop pkg/inst_r oot=/export/repoSolaris11

# svccfg -s application/pkg/server setprop pkg/readonly=true

使用ps来查看是否具有pkg.deportd进程:

# ps -ef |grep pkg.depotd

 root  1188   1  0 17:43:56 ? 0:08 /usr/bin/python2.6 /usr/lib/pkg.depotd --cfg svc:/application/pkg/server:default

缺省情况下pkg/server程序包使用80端口作为程序pkg.deportd的监听端口,如果系统中有其他应用程序使用80端口,那么就必须使用以下命令改变pkg.deportd的监听端口:

svccfg -s application/pkg/server setprop pkg/port=port_number

port_number可以根据系统具体情况进行设定。

修改好端口号以及定制好其他属性后,就可以重新启动web服务进程了:

# svcadm refresh application/pkg/server

# svcadm enable application/pkg/server

 

至此可以通过pkg set-publisher进行发布了:

pkg set-publisher -G * -M * -g http://localhost:port_number/ solaris

客户端可以直接使用pkg set-publisher设置http服务端的分布,然后可以通过浏览器或者pkg命令直接管理和安装软件包和update系统了。下图显示浏览器访问界面:

图片无法显示,请参考我的豆丁文档:http://www.docin.com/p1-671236987.html

至此solaris 11repository的设置和发布以及pkg命令set-publisher以及安装等简单使用初步介绍了,IPS的管理和修改,以及pkg命令如何更新系统等等介绍请参考后续的文档。







  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2013年最新版的强悍Unix版本Solaris 11.1系统文件,功能十分强大,不愧是真正血统的Unix系统! Oracle Announces Availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1 Delivers Oracle Database and Java Enhancements, Expanded Mission Critical Cloud Management Capabilities and Advanced Platform Features Redwood Shores, Calif – October 26, 2012 News Facts Oracle today announced general availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1. Oracle Solaris 11 is the first cloud OS that allows customers to build large-scale enterprise-class Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) clouds on a wide range of SPARC and x86 servers and Oracle engineered systems. Oracle Solaris Cluster 4.1 extends high availability and disaster recovery capabilities of Oracle Solaris and includes unique virtual cluster features supporting highly efficient application consolidation with best-in-class availability. Oracle Solaris 11 is already widely in production with thousands of customers with mission critical deployments across industries such as financial services, communications, healthcare, retail, public sector and media and entertainment. Read customer success stories about Oracle Solaris here. Oracle Solaris 11 is also gaining strong momentum among enterprise application vendors with hundreds of applications already qualified for Oracle Solaris Ready status through the Oracle PartnerNetwork (OPN). OPN members can develop, sell and implement their solutions on Oracle Solaris 11 and take advantage of specialized Oracle Solaris resources to expand their market reach. Customers and partners can quickly and safely upgrade to Oracle Solaris 11.1 using the built-in update tools and software repositories available with Oracle Solaris 11. Oracle will host a webcast on November 7, 2012 at 8 a.m. Pacific time on Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, featuring Markus Flierl, vice president, Oracle Solaris Engineering, Core Technology and Bill Nesheim, vice president, Oracle Solaris Engineering, Platform Software. Register here. This event will also include an interactive chat with core developers of Oracle Solaris and Oracle Solaris Cluster. New and Enhanced Features in Oracle Solaris 11.1 Oracle Solaris 11.1 increases the performance, availability and I/O throughput of the latest Oracle Database technology. A new, optimized shared memory interface between the Oracle Database and Oracle Solaris 11.1 provides 8x faster database startup and shutdown, as well as online resizing of the Oracle Database System Global Area (SGA). Oracle Solaris 11.1 introduces unique new capabilities for optimizing Oracle Database performance. Oracle Solaris 11.1 exposes Oracle Solaris DTrace I/O interfaces that allow an Oracle Database administrator to identify I/O outliers and subsequently isolate network or storage bottlenecks. A new Oracle Solaris DTrace plug-in for Oracle Java Mission Control to enable customers to profile Java applications on Oracle Solaris production systems. New cloud management features add to Oracle Solaris 11’s zero overhead built-in virtualization capabilities across system, network and storage resources, including expanded support for Software Defined Networks (SDN) with Edge Virtual Bridging enhancements, to maximize network resource utilization and manage bandwidth in cloud environments. New built-in memory predictor monitors application memory use and provides optimized memory page sizes and resource location to speed overall application performance. Support for an unprecedented 32 TB of RAM and thousands of CPUs unlocks the full potential of Oracle’s latest server systems. Oracle Solaris Cluster 4.1 Highlights New Oracle Solaris 10 Zone Clusters allow customers to consolidate mission critical Oracle Solaris 10 applications on Oracle Solaris 11 cloud environments. Expanded disaster recovery operations using Oracle’s Sun ZFS Storage Appliance services along with Oracle Solaris Cluster 4.1 to coordinate failover of applications and data to a remote disaster recovery site. Faster application recovery with improved storage failure detection and resource dependencies management. New labeled security capability in Oracle Solaris Zone Clusters provides military grade application separation in highly consolidated mission-critical deployments using Oracle Solaris 11 Trusted Extensions. Integrated Oracle Deployments and Support Oracle Enterprise Manager Ops Center provides comprehensive cloud management capabilities for Oracle Solaris 11, including self-service provisioning of Oracle Solaris 11 Zones. Ops Center’s integrated systems management delivers enterprise scale cloud performance. Oracle Enterprise Manager Ops Center is available to Oracle Solaris customers at no additional cost under the Ops Center Everywhere Program. Oracle Solaris Studio delivers the latest in compiler optimizations, multithread performance and powerful analysis tools for native development, and optimized application performance and reliability on Oracle Solaris 11.1 systems. Oracle Solaris 11 guarantees binary compatibility with previous Oracle Solaris versions through the Oracle Solaris Binary Application Guarantee Program, which provides customers a seamless upgrade path and the industry’s best investment protection. Oracle Solaris Legacy Containers allows older Oracle Solaris environments to be brought forward onto latest generation hardware to provide power, cooling and footprint consolidation savings. OPN members can find Oracle Solaris tools and resources in the Oracle Solaris Knowledge Zone, including Oracle Solaris Ready, Oracle Solaris 11 Specialization and Oracle Solaris Development Initiative. The Oracle Solaris Remote Lab now provides a secure cloud environment for OPN members to test and validate their applications with Oracle Solaris 11 in SPARC and x86 virtual environments. Supporting Quotes “Oracle recommends Oracle Solaris 11 for all UNIX®-based Oracle implementations. Oracle Solaris 11.1 delivers over 300 new performance and feature enhancements and is engineered together with Oracle Database, middleware, applications to increase performance, streamline management and automate support for Oracle deployments,” said John Fowler, executive vice president, Systems, Oracle. “The combination of the secure, highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective, agile cloud environment and delivers extreme availability for enterprise applications.” “Clients are looking for ways to reduce the complexity of systems management while enabling Platform as a Service (PaaS) & Software as a Service (SaaS) clouds,” says Lee Diamante, solutions architect, Systems Computing Solutions at Forsythe. “The value of Oracle Solaris 11 is that it maintains all the enterprise-class features expected with a mission-critical OS, while bringing in new, innovative technologies. Forsythe has a long and rich history of delivering customer solutions on Oracle Solaris systems. This is why we are excited about the Solaris 11.1 release.” “Oracle is making it much easier for partners like Informatica to gain access to their software with the new testing environments; shrinking the time to measurable results and value,” said Julie Lockner, vice president, ILM, Informatica. “With the release of Oracle Solaris 11.1 Informatica customers now have access to mission critical deployments across major industries, with an environment of high performance and high availability. With all the new feature enhancements, we look forward to making the Informatica Platform certified on the Oracle Solaris 11 product family.”

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值