pigfoot’s weblog

We should forget about small efficiencies — Donald Knuth

Archive for the ‘RedHat’ Category

Announcing End of Life times (Fedora Core 1, 2, Red Hat Linux 7.3, 9)

Fedora Legacy Project announces End of Life Times of Fedora Core 1 & 2, Red Hat Linux 7.3 & 9 as Fedora Core 6 Test 2 releases at July 26th.

By the way, Red Hat is prepping Enterprise Linux 5 Desktop.

Popularity: 26% [?]

  • 0 Comments
  • Filed under: IT, Linux, RedHat, Unix
  • If you try to re-build kernel in RHEL 4, but encounter this error message:

    [/usr/src/kernels/2.6.9-34.0.2.EL-i686]# make bzImage
    CHK include/linux/version.h
    CHK include/asm-i386/asm_offsets.h
    UPD include/asm-i386/asm_offsets.h
    /bin/sh: arch/i386/kernel/asm-offsets.s: No such file or directory
    mv: cannot stat `include/asm-i386/asm_offsets.h.tmp’: No such file or directory
    make: *** [include/asm-i386/asm_offsets.h] Error 1

    This is because RHEL4 doesn’t install kernel source package by default, but install a package including minimum kernel header and source file (kernel-devel-$(uname -r).i686.rpm).

    This package provides kernel headers and makefiles sufficient to build modules against the kernel package. Hence it cannot be used to build kernel source.

    To re-build kernel, please to see the “kernel” section in the release-notes in RHEL 4.

    In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel’s .src.rpm file, Red Hat Enterprise Linux 4 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel.src.rpm file.

    To create an exploded source tree from this file, perform the following steps:

    1. Obtain the kernel-$(uname -r).src.rpm file from one of the following sources:
      • The SRPMS directory on the appropriate “SRPMS” CD iso image
      • By running the following command:
        up2date –get-source kernel
    2. Install kernel-$(uname -r).src.rpm
      rpm -Uvh /var/spool/up2date/kernel-$(uname -r).src.rpm (if kernel.src.rpm is gained by up2date)
    3. Change directory to /usr/src/redhat/SPECS/
    4. rpmbuild -bp –target=$(uname -m) kernel-2.6.spec
    5. Issue the following command:
      make oldconfig

    You can then proceed as usual.

    Popularity: 35% [?]

  • 1 Comment
  • Filed under: IT, Linux, RedHat, Unix
  • RedHat 在 RPM 推出之後, 解決了不用重新 configure ; make ; make install 的惡夢 (想想要裝新軟體的時候, 發現系統中竟然沒有 gcc 的窘境), 似乎只要會 rpm -Uvh, 就可以從此過著幸福快樂的生活. 但是事與願違, 另一個地獄卻衍生出來 — 我要去哪找 rpm 來裝?

    我接下來會有這個系列幾篇的文章, 講一下怎樣安裝好 RPM. 我會拿 perl-Text-Iconv 這個還蠻多程式會用到的 perl module 來當例子.

    第一個是手動的方法.

    1. 判斷你要安裝的系統是哪個 linux distribution

    我相信應該自己會知道是 RedHat, Gentoo, Debian, 或是 Ubuntu. 這裡只會講 RedHat Enterprise Linux (RHEL), 以及 RedHat Fedora (FC). 判斷的方法就是

    # cat /etc/redhat-release

    比方說, 結果是 Red Hat Enterprise Linux ES release 4 (Nahant Update 3), 就是 RHEL4 ES Update3; Red Hat Enterprise Linux AS release 3 (Taroon), 就是 RHEL4 AS. Fedora 的例子比方說 Fedora Core release 3 (Heidelberg) 就是 Fedora Core 3. 如果是 Red Hat Enterprise Linux 的話, 因為 RedHat 已經不提供 public binary RPM 的服務, 所以本篇對您可能沒有幫助, 請見本系列的下一篇.

    2. 到 Official site 找 RPM

    根據 Fedora Core Wiki Site, Fedora 的 Official Download Location 如下:

    找到你需要的 RPM 再安裝即可. 就我們 perl-Text-Iconv 這個例子來說, 就是在 Fedora Extras 裡就可以找到 RPM 了.

    3. 到 Un-official site 找 RPM

    如果您要找的 RPM 還找不到, 那一般來說, 大家都會到 rpmfind.net 來找非官方的 RPM. 這也是個信賴度比較高的網站. 比方說, 這個 URL http://rpmfind.net/linux/rpm2html/search.php?system=fedora 就是只 query Fedora 的 RPM.

    如果以上還找不到, 基本上是可以求助 google 大神. 不過這個就要小心那些 RPM 是不是有被放入木馬的可能性了.

    Popularity: 29% [?]

  • 0 Comments
  • Filed under: IT, Linux, RedHat, Unix