天上天下唯我独尊!!ブログのFreeBSDと自作PCのまとめ記事です.

FreeBSDのアップデートは、freebsd-updateと言うツールでアップデート出来ます。詳しくはこちらも参照してください。

freebsd-updateのコマンドとオプションは以下のようになっています。

DREAMCRAFT2 /root# freebsd-update -h
usage: freebsd-update [options] command ... [path]

Options:
  -b basedir   -- Operate on a system mounted at basedir
                  (default: /)
  -d workdir   -- Store working files in workdir
                  (default: /var/db/freebsd-update/)
  -f conffile  -- Read configuration options from conffile
                  (default: /etc/freebsd-update.conf)
  -k KEY       -- Trust an RSA key with SHA256 hash of KEY
  -r release   -- Target for upgrade (e.g., 6.2-RELEASE)
  -s server    -- Server from which to fetch updates
                  (default: update.FreeBSD.org)
  -t address   -- Mail output of cron command, if any, to address
                  (default: root)
Commands:
  fetch        -- Fetch updates from server
  cron         -- Sleep rand(3600) seconds, fetch updates, and send an
                  email if updates were found
  upgrade      -- Fetch upgrades to FreeBSD version specified via -r option
  install      -- Install downloaded updates or upgrades
  rollback     -- Uninstall most recently installed updates
  IDS          -- Compare the system against an index of "known good" files.
DREAMCRAFT2 /root#

freebsd-updateは、大きく分けて二つの機能を持っています。

一つはセキュリティアップデート、二つめはfreebsdのマイナーアップデートやメジャーアップデートを行う機能です。


1.セキュリティアップデート

freebsd-update fetch

freebsd-update install

これでセキュリティアップデートが実施されます。

確認方法は、uname -a (又は -r)で確認出来ます。

以下の様に「-p3」と言うように表示されます。

DREAMCRAFT2 /root# uname -r
8.2-RELEASE-p3
DREAMCRAFT2 /root# 


2.セキュリティアップデートの自動実行

自動実行と言っても難しい設定はありません。他の自動実行プログラムと同じです。

/etc/crontabに追加します。

0	2	*	*	*	root	/usr/sbin/freebsd-update cron

上記の設定は、毎日午前2時にfreebsd-update cronを実行します。

freebsd-update cronが完了すると、root宛にメールが来ます。

あとはfreebsd-update installを実行するだけです。

アクセスカウンター

Menu

章別メニュー

目的別メニュー

開くメニュー

閉じるメニュー

  • アイテム
  • アイテム
  • アイテム
【メニュー編集】

サーバ・パソコン・電子機器のことなら

夢システム工房 人の技術の未来をつなぐ 技術の夢システム工房


夢システム工房は電子機器の開発とシステム開発を得意としています。なんなりとご相談ください。

フリーエリア

Wiki内検索

フリーエリア

ブロガー(ブログ)交流空間 エディタコミュニティ

管理人/副管理人のみ編集できます

メンバー募集!