FreeBSD source 更新與系統升級

FreeBSD source 更新與系統升級 for 4-stable
Last Update: 2005/12/03

安裝完 FreeBSD 也安裝好 CVSup 套件後
就可以開始做 source 更新與系統升級
來修補 FreeBSD 系統上的漏洞 維護系統安全

不過要先確定在安裝FreeBSD時 有安裝 src 否則更新會花很多時間
可透過 /stand/sysinstall 選擇安裝 src
# /stand/sysinstall

將 stable-supfile 複製至 /root/
# cp /usr/share/examples/cvsup/stable-supfile
# ee /root/stable-supfile

編輯 stable-supfile 更改下列部分
*default host=CHANGE_THIS.FreeBSD.org
*default release=cvs tag=RELENG_4

附註:RELENG_4 為抓取 4-stable, RELENG_4_10 則為 4.10-stable

再來 就可以開始更新 source 了
# cvsup -g -L 2 /root/stable-supfile

更新完 source 後 便是要更新系統
# cd /usr/src
# make -j4 buildworld

編譯核心 請將 MYKERNEL 改為你的核心名稱
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL
# sync;sync;sync;reboot

# cd /usr/src
# make installworld
# mergemaster

更新檔案與現有的設定檔做比對 讓操作者決定是否安裝新版的設定檔
在執行過程中,會把原始和新的設定檔差別顯示出來。
“i” - 安裝新的設定檔 “d” - 保留原始的設定檔 “m” - 手動增修設定檔

如果都處理完,最後會出現幾個問題:
Do you wish to delete what is left of /var/tmp/temproot? [no] y
按 y ,刪除暫存檔。

*** You installed a new /dev/MAKEDEV script, so make sure that you run
‘cd /dev && /bin/sh MAKEDEV all’ to rebuild your devices
Would you like to run it now? y or n [n] y

按 y ,執行 /dev/MAKEDEV

*** You installed a new aliases file, so make sure that you run
‘/usr/bin/newaliases’ to rebuild your aliases database
Would you like to run it now? y or n [n] y

按 y 將 aliases 文字檔轉成資料庫格式。

清除編譯所產生的檔案及目錄 重新開機 測試安裝後是否可正常運作
# make clean cleandir
# sync;sync;sync;reboot

確認系統版本
# uname -a

這樣 我們就完成了系統升級囉!!

Trackback URL for this post:

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
Web Hosting by Arvixe