Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2440756
  • 博文数量: 367
  • 博客积分: 10016
  • 博客等级: 上将
  • 技术积分: 3555
  • 用 户 组: 普通用户
  • 注册时间: 2006-09-04 15:12
个人简介

MEI SHENME

文章分类

全部博文(367)

文章存档

2009年(2)

2008年(1)

2007年(2)

2006年(362)

我的朋友

分类:

2006-09-21 11:05:54

安装solaris9操作系统

    六种方法:
        1.Solaris suninstall program
        2.Solaris™ Web Start Installation software
        3.Custom JumpStart™ procedure
        4.Solaris Web Start Flash installation
        5.Standard upgrade
        6.Solaris™ Live Upgrade method
    安装solaris 9的硬件要求:
        A system based on an UltraSPARC& processor
        64 Mbytes of memory
        2.3 Gbytes of disk space
        A keyboard and monitor
        Access to a CD-ROM drive or an installation server

   一、 solaris操作系统的组件:

        Software packages
        Software clusters
        Software groups
        这们之间的关系:Software packages   
        Software packages包含了一组文件和路径;
        Software clusters包含了许多软件包:例如:
        CDE的Software clusters就包含了以下的lpackages
SUNWdtab SUNWdthed SUNWdtmad SUNWeudhr
SUNWdtbas SUNWdthev SUNWdtrme SUNWeudhs
SUNWdtdem SUNWdticn SUNWdtwn SUNWeudis
SUNWdtdmn SUNWdtim SUNWeudba SUNWeudlg
SUNWdtdst SUNWdtinc SUNWeudbd SUNWmfman
SUNWdthe SUNWdtma SUNWeudda

        Software groups:  solaris OE就有以下几个Software groups来组成:

            Core
            End User System Support
            Developer System Support
            Entire Distribution
            Entire Distribution Plus Original Equipment Manufacturers (OEM)

        Core software gruop,只一个软件cluster,即SUNWCreq,是一个最小的软件,包括启动部分和最小的配置;不支持一些服务,它所支持只有:telnet ftp NFS NIS DNS,和一些需要CDE的驱动,但没有CDE,不包括在线手册.
        End User System Support Software Group (SUNWCuser)
            包括core和一些推荐的软件即一个CDE;
        Developer System Support Software Group (SUNWCproq)
            包括:End User 软件包和library,在线手册,程序开发工具;
        Entire Distribution(SUNWCall)
            包括eveloper system软件包,和其它一些服务,
        Entire Distribution Plus OEM Support Software Group(SUNWXCall)
            包括:Entier 软件包和支持OEM的硬件支持;

        查看cluster配置,可以通过以下:
# grep METACLUSTER /var/sadm/system/admin/.clustertoc
METACLUSTER=SUNWCXall
METACLUSTER=SUNWCall
METACLUSTER=SUNWCprog
METACLUSTER=SUNWCuser
METACLUSTER=SUNWCreq
METACLUSTER=SUNWCmreq

        注意:SUNWCmreq是一隐藏的softer cluster,是可以配置一个比core还小的应用;

        查看当前clustser的配置:
# cat /var/sadm/system/admin/CLUSTER
CLUSTER=SUNWCXall

        
    二、从光盘安装solaris
   
        安装时需要的工作:
            1。考虑为每个语言包的空间;
            2。如果提供打印和mail应用,就增加一下/var的文件系统;
            3。计划用crash dump 特性,就为/var分物理内存两倍的空间;
            4。计划给每个用户提供home目录就生成一个/export文件系统;
            5。分配30%给每个文件系统,生成mininum给每个文件系统,以备将来更新;
            6。给附加软件和第三方软件预留空间;
        安装时提供以下信息:
             Hostname ,IP , Name server type(NIS or LDAP..),
、            subnet mask, root password, language



Module 6 管理solaris9的软件包

    软件包包含:
        1.描述软件包的文件和需要占用的硬盘空间;
        2.压缩的软件
        3.在软件安装,删除时的脚本;

    /var/sadm/install/contents

        此文件包含了系统中所有安装的软件记录;
        # more /var/sadm/install/contents    显示所有内容
        # grep showrev /var/sadm/install/contents    查找相关软件包是否被安装;

    命令行管理软件包:

        pkgadd 在操作系统上安装软件包
        pkgrm 从系统中删除软件
        pkginfo 显示软件包信息
        pkgchk 检测软件包安装信息;
   
    显示系统中安装的软件包:

        /var/sadm/pkg这个目录保存了安装的软件包记录;
        
        下面这个命令显示了系统已装的信息包;
# pkginfo | more
;
application NSCPcom Netscape Communicator
system SUNWaccr System Accounting, (Root)
system SUNWaccu System Accounting, (Usr)
system SUNWadmap System administration applications
system SUNWadmc System administration core libraries
system SUNWaudd Audio Drivers)
ALE SUNWciu8 Simplified Chinese iconv modules for UTF-8
system SUNWcsd Core Solaris Devices
CTL SUNWctplx Portable layout services for CTL (64-bit)
system SUNWdoc Documentation Tools
application SUNWdej2p Java Plug-in

        第一列:    软件包的类型;系统,应用 , CTL或ALE
        第二列:    软件包名称   
        第三列:     软件包的描述;

        显示所有软件包的详细信息:
            # pkginfo -l | more
        显示SUNWman软件包的详细信息:
            
# pkginfo -l SUNWman
PKGINST: SUNWman
NAME: On-Line Manual Pages
CATEGORY: system
ARCH: sparc
VERSION: 42.0,REV=35
BASEDIR: /usr
VENDOR: Sun Microsystems, Inc.
DESC: System Reference Manual Pages
PSTAMP: tinkertoym21003318
INSTDATE: Sep 27 2001 10:43
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 7033 installed pathnames
3 shared pathnames
84 directories
81450 blocks used (approx)

    显示系统已安装软件包的数量:
        # pkginfo | wc -l
   
               
    显示光盘相关目录的软件包:
        pkginfo -d /cdrom/cdrom0/s0/Solaris_9/Product |more
        
        提示:光盘CD1of2 中放了core and END USER software Groups
             cd2 of 2 中放了Developer, Entire Distribution, and Entire Distribution Plus OEM Support    software groups.
   
   
    安装软件包从光盘到系统中:
        # pkgadd -d . SUNWns6m
   
    查看软件安装状况:
        # pkgchk SUNWcarx
        
        加-v 参数可查看软件包安装在那些目录下放置了文件:
        # pkgchk -v SUNWcarx

    查看文件状态:
        #pkgchk -p /etc/passwd
        查看passwd文件什么时候软件包创建,最一次修改时间以及原始文件大小,及现在大小;
        #pkgchk -l -p /etc/group
        查看此文件被那个软件包创建,以及一些相关信息;

        提示:必须使用绝对路径,否则不显示信息;

    删除软件包:

        # pkgrm SUNWapchr  删除软件包SUNWapchr


    增加一个软件包spool 路径:
        默认情况下,spool路径放在/var/spool/pkg ,
        增加方法如下:
# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product -s spool SUNWensqr.u

        如果想删除spool路径:
# pkgrm -s spool SUNWensqr.u

        如果想增加一个spool中径到一个自己指定的目录/export/pkg下,则如下操作:

# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product -s /export/pkg SUNWensqr.u
# pkgrm -s /export/pkg SUNWensqr.u
   
   
    本章回顾:
pkginfo 显示安装在系统中的软件包或在介质可用的软件包
pkgadd 安装软件包
pkgrm 删除软件包
pkgchk 检测属于软件包的路径的属性,以及软件包状态;

/var/sadm/install/contents 存放安装在系统中的所有软件包信息
/opt/pkgname 推荐但没有安装的非附送软件
/opt/pkgname/bin or /opt/bin 没有安装的非附送软件包的可执行文件
/var/opt/pkgname or /etc/opt/pkgname 非附送软件的日志文件存放处;


Module 7    管理软件补丁

    solaris补丁共分以下五种:

        标准补丁(standard pathc):维护指定软件或硬件的问题;
        推荐补丁(recommended pathc):大部分系统可能出现的问题;
        Y2K patch(二千年问题补丁):
        补丁群(patch cluster):标准补丁,推荐补丁,安全补丁,Y2k patch等补丁被捆到一起.
        维护更新Maintenance update)

    patch号的规则:
        例如:105050-01 ,   105050为基础号; 01为版本号;

    可通过或FTP到网上下载patch;
    pathc文档放在/pub/patches目录下;
   
    Solaris9.PatchReport 介绍solaris9patch摘要
    9_Recommended.README 介绍安装方法,以及一些提示和警告;
        
    检查系统已经安装的patch:
        # showrev -p

        # patchadd -p

        提示:showrev -p 和patchadd -p是一样的,只是patchadd显示稍微详细一点,
            还有就是showrev是一个二制命令,patch是一个脚本命令;

    显示patch安装的目录:
    # ls /var/sadm/patch
    所以/var必须为安装补丁预留充分的空间;

    获取补丁的方法:
        用户可向SUN索取update CDrom,或到网站下载;
-------------------------------------------------------------------------------------------
提示:mget获取文件时每个文件都会提醒,如果不想可以用ftp -i FTPweb,或者在FTP登录后输入prompt命令;
--------------------------------------------------------------------------------------------

    准备安装:
        .ZIP文件:  # /usr/bin/unzip 105050-01.zip
        .tar.z文件:# /usr/bin/zcat 105050-01.tar.Z | tar xvf -

    安装:
        # patchadd 105050-01

存储在/usr/sbin/patchadd下的error code:
0 No error.
1 Usage error.
2 An attempt to apply a patch that has already been
applied.
3 The effective user ID (EUID) is not root.
4 An attempt to save original files failed.
5 The pkgadd command failed.
6 The patch is obsolete.
7 An invalid package directory.
8 An attempt to patch a package that is not installed.
9 Cannot access /usr/sbin/pkgadd (client problem).
10 Package validation errors.
11 An error occurred while adding a patch to the root
template.
12 The patch script terminated due to a signal.
13 A symbolic link was included in the patch.
14 Not used.
15 The prepatch script had a return code other than 0.
16 The postpatch script had a return code other than 0.
17 A mismatch of the -d option occurred between a
previous patch installation and the current one.
18 There is not enough space in the file systems that are
targets of the patch.
19 The $SOFTINFO/INST_RELEASE file was not found.
20 A direct instance patch was required but was not
found.
21 The required patches have not been installed on the
manager.
22 A progressive instance patch was required but was not
found.
23 A restricted patch is already applied to the package.
24 An incompatible patch was applied.
25 A required patch was not applied.
26 The user-specified backout data cannot be found.
27 The relative directory supplied cannot be found.
28 A pkginfo file is corrupt or missing.
29 Bad patch ID format.
30 Dry run failures occurred.
31 The path given for the -C option was invalid.
32 You must be running the Solaris 2.6 OE to the Solaris 9
OE.
33 The patch file was formatted incorrectly or the patch
file was not found.
34 An incorrect patch spool directory was given.
35 A later revision was already installed.
36 You cannot create a safe temporary directory.
37 An illegal backout directory was specified.


    删除补丁patchrm:
        如下三种情况无法正常删除补丁:

            1.在安装补丁时用了-d参数:patchadd -d  即更新不进行备份;
            2.此补丁被其它补丁使用;
            3.补丁已经被更新的补丁替代;

    # patchrm 105050-01


    安装patch cluster:

        patch cluster由推荐补丁,安全补丁以及Y2K patch组成;安装时必须在/ /var /usr /opt有至少10M的空间,会把patch存在/var/sadm/pkg目录,也可-nosave,将不能对个别patch进行恢复删除,


    具体步骤如下:
        1.确定.zip 或.tar.z文件已经解压;
        2.决定使用默认的save还是-nosave属性;
        3.到解压后的patch cluster目录,进行安装
# cd patch_cluster_directory
# ./install_cluster
        4.查看个别的patch的README文件,看是否还要进行附加的步骤;
        5.查看日志文件,查看详细信息;
        6.重启机器,使patch 生效;
阅读(2526) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~