關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 安裝 Patch 到 Linux Kernel

    Posted on November 21st, 2006 Sam Tang No comments

    Linux 會在新版本的 kernel 加入有一些安全修補、新功能或硬件支援,除了重新編譯 kernel 或透過 Linux Distro 升級外,還可以安裝 Patch,以下例子是將 patch-2.6.18.3.gz 下載到 /usr/src 下面安裝。

    首先從 kernel.org 下載所需的 patch:

    cd /usr/src
    wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.18.3.bz2

    假如你所編譯的 linux kernel 是存放在 /usr/src/linux,執行:

    cd /usr/src/linux
    bzip2 -dc /usr/src/patch-2.6.18.3.bz2 | patch -p1 –dry-run
    bzip2 -dc /usr/src/patch-2.6.18.3.bz2 | patch -p1

    以上第二行只是測試,如果沒有輸出錯誤就可以執行最後一行。


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word