UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

Softwareupdate on tiger

Softwareupdate on tiger


0.改訂履歴

  • 2005.08.17 新規作成
  • 2006.12.08 体裁の修正

1.はじめに

 このドキュメントでは,MacOS X 10.4.xにて,ソフトウェアアップデートを手動で実施する手順を説明する. ソフトウェアアップデートは,MacOS XにログインしていればGUIを使って手動でインストールしたり,アップデートが通知されたらポップアップダイアログが表示されるが,サーバやリモートで利用している場合はリモート接続してコマンドからアップデートを実行することができるので,実施手順を確認する.

2.アップデータのリストを確認する

  • ターミナルを起動し,softwareupdateコマンドを実行する.
Last login: Mon Aug 15 18:13:51 on ttyp3
Welcome to Darwin!
XserveG4:~ members$ softwareupdate
usage: softwareupdate <mode> [<args> ...]

        -l | --list             List all appropriate updates
        -d | --download         Download Only
        -i | --install          Install
                <label> ...     specific updates
                -a | --all              all appropriate updates
                -r | --recommended      only recommended updates
                -u | --url <url> ...    from signed package URLs

        Per-user preferences:
        --ignore <label> ...    Ignore specific updates
        --reset-ignored         Clear all ignored updates
        --schedule (on | off)   Set automatic checking

        -h | --help     Print this help
XserveG4:~ members$
  • オプションが表示される.
  • 現在適用できるリストを取得する.
XserveG4:~ members$ softwareupdate -l
Software Update Tool
Copyright 2002-2005 Apple

Software Update found the following new or updated software:
   * SecUpd2005-007Ti
        Security Update 2005-007 (1.0), 17910K [recommended] [restart]
XserveG4:~ members$
  • アップデートがrecommended(推奨)で,実行するとリスタートが必要と言うことがわかる.

3.アップデートを実施する

  • -iオプションを利用し,指定したアップデートのみを適用する.
XserveG4:~ members$ softwareupdate -i SecUpd2005-007Ti
Software Update Tool
Copyright 2002-2005 Apple

Must be run as root
XserveG4:~ members$
  • 管理者権限で,実行する
XserveG4:~ members$ sudo softwareupdate -i SecUpd2005-007Ti
Password: ■■■■■
Software Update Tool
Copyright 2002-2005 Apple


Downloading Security Update 2005-007    
Downloading Security Update 2005-007    0..20..40..60..80..100
Expanding Security Update 2005-007      
Installing Security Update 2005-007     0..20..40..60..80..100
Done.

You have installed one or more updates that requires that you restart your
computer.  Please restart immediately.
XserveG4:~ members$  
  • これで,作業後リスタートして完了.

4.ダウンロードのみ実行

  • ダウンロードを実行する.
XserveG4:~ admin$ softwareupdate -d SecUpdSrvr2005-007Ti
Software Update Tool
Copyright 2002-2005 Apple


Downloading Security Update 2005-007
Downloading Security Update 2005-007    0..20..40..60..80..100
Expanding Security Update 2005-007      
Done.
Packages have been saved to /Library/Packages
XserveG4:~ admin$
  • パッケージが保存されているところを確認する.
XserveG4:~ admin$ cd /Library/Packages/
XserveG4:/Library/Packages admin$ ls -al
total 0
drwxrwxrwx    3 server  admin   102 Aug 17 15:20 .
drwxrwxr-x   51 root    admin  1734 Aug 17 15:17 ..
drwxr-xr-x    3 server  admin   102 Aug 10 07:34 SecUpdSrvr2005-007Ti.pkg
XserveG4:/Library/Packages admin$
  • パッケージの状態で保存されていることが確認できた.

5.アップデータが無い場合のレスポンス

  • コマンドを実行したときに,未適用のアップデータが存在していない場合に,は,次のように表示される.
MacG5:~ members$ softwareupdate -l
Software Update Tool
Copyright 2002-2005 Apple

No new software available.
XserveG4:~ members$  

6.全てのアップデータを適用する

  • 自動的に全部アップデータを適用する
XserveG4:~ admin$ sudo softwareupdate -i -a
Password:
Software Update Tool
Copyright 2002-2005 Apple


Downloading Security Update 2005-007
Downloading Security Update 2005-007    0..20..40..60..80..100
Expanding Security Update 2005-007      
Installing Security Update 2005-007     0..20..40..60..80..100
Done.

You have installed one or more updates that requires that you restart your
computer.  Please restart immediately.
XserveG4:~ admin$  
  • リスタートは自分で実行する必要がある.

7.誰もGUIでログインしていない場合

  • サーバ運用していて,誰もGUIログインしていない状態だと,管理権限を持っていてもエラーとなる.
XserveG4:~ admin$ softwareupdate -l
Software Update Tool
Copyright 2002-2005 Apple

kCGErrorRangeCheck : Window Server communications from outside of session
 allowed for root and console user only
INIT_Processeses(), could not establish the default connection to the
 WindowServer.Abort trap
XserveG4:~ admin$ su
Password: ■■■■■■■■■■■■
XserveG4:/Users/admin root# softwareupdate -l
Software Update Tool
Copyright 2002-2005 Apple

No new software available.
XserveG4:/Users/admin root#  
  • そのような場合には,rootユーザで実行すれば良い.


広告スペース
Google