pigfoot’s weblog

We should forget about small efficiencies — Donald Knuth

Archive for the ‘Unix’ Category

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: 30% [?]

  • 0 Comments
  • Filed under: IT, Linux, RedHat, Unix
  • Linux 2.6 vs. Solaris 10, from OSNews.

    It, however, is very strange that I cannot feel such considerable performance improvement in Solaris 10. My summary is as followings.

    There are several often overlooks positive features of Solaris as an alternative to Linux in lage enterprize environment:

    • Solaris is more stable, especially in network intensive tasks.
    • New T1 CPUs make Solaris on SPARC more attractive and provide a clean migration path from older UltraSparc models that fall behind in price/performance ratio.
    • Due to the architecture of Solaris kernel and I/O subsystem there are several open source applications that can run on Solaris better then on Linux. Among them are all multithreading applications and open source databases. Solaris also significantly improves the security of open source applicators due to built-in protection from stack overflows.
    • The recent test conducted by Sun [MySQL2006] had show that optimized for Solaris MySQL (UFS?) beats MySQL on RED HAT ES 4 (ext3?) by a considerable margin.
    • It is unclear how it goes against ZFS in Solaris. Newer ZFS is still in too early stage for comparisons.
    • For tracking system calls Solaris has an excellent truss utility. For Linux, the strace utility provides a similar but weaker function. For more complex situations Solaris has Dtrace. Currently Linux has no analogs for Dtrace.

    There are also several disadvantages of Solaris:

    • Linux has larger “knowledge space” especially noticeable in the number of published books. While Solaris has much better OS level security, Linux has better “open source knowledge infrastructure” including the information about securing open source applications, especially those implementing key application level TCP/IP protocols (HTTP, DNS, SMTP, ssh, Kerberos, etc)

    Popularity: 20% [?]

  • 0 Comments
  • Filed under: IT, Linux, Sun, Unix
  • Gentoo Linux founder quits Microsoft

    Gentoo Linux founder quits Microsoft (Chinese Version), (February 14, 2006)

    Daniel Robbins 在 06/2005 才到而己, 半年多就走了. 看起來好像待的不是很愉快貌.

    Popularity: 16% [?]

  • 1 Comment
  • Filed under: IT, Linux, Microsoft, Unix
  • Improve performance in Ubuntu

    Improve performance in Ubuntu, from digg.

    This is an index of threads on how to get the best performance out of your Ubuntu machine. The thread descriptions are as followings:

    Popularity: 19% [?]

  • 0 Comments
  • Filed under: IT, Linux, Ubuntu
  • When I try to upgrade my system, but I get the error below:

    sojia src # emerge -uvDNp worldThese are the packages that I would merge, in order:

    Calculating world dependencies …done!
    [blocks B ] sys-apps/pam-login (is blocking sys-apps/shadow-4.0.15-r2)
    [ebuild U ] sys-apps/shadow-4.0.15-r2 [4.0.14-r1] +nls -nousuid +pam (-selinux) -skey 1,264 kB

    Total size of downloads: 1,264 kB

    According to this page on http://forums.gentoo.org, the clue is in the shadow ChangeLog:

    *shadow-4.0.14-r2 (12 Mar 2006)
    12 Mar 2006; Diego Pettenò +files/login.defs,
    +files/login.pamd, +shadow-4.0.14-r2.ebuild:
    Merge pam-login back into shadow, as 4.x version was already being used;
    this means that upgrade from 4.0.14-r1 requires to remove pam-login before.

    To solve “emerge -C pam-login && emerge -1 shadow”, this is safe to do.

    Update: Thanks Julian. It’s more safe to perform “emerge –buildpkgonly –nodeps shadow && emerge -C pam-login && emerge –usepkgonly shadow

    Popularity: 23% [?]

  • 2 Comments
  • Filed under: Gentoo, IT, Linux, Unix
  • When you try to upgrade your system via portage system recently, you will find the error message as followings:

    sojia portage # emerge -uvDNpt world

    These are the packages that I would merge, in reverse order:

    Calculating world dependencies
    !!! Packages for the following atoms are either all
    !!! masked or don’t exist:
    sys-apps/fileutils

    This is because sys-apps/sh-utils, sys-apps/fileutils, and sys-apps/textutils have been replaced by sys-apps/coreutils. If you want to get rid of this kind of warning, you must update your /var/lib/portage/world by your-self.

    In other words, remove sys-apps/sh-utils, sys-apps/fileutils, and sys-apps/textutils these three lines in your /var/lib/portage/world, the warning will be gone.

    Popularity: 17% [?]

  • 2 Comments
  • Filed under: Gentoo, IT, Linux, Unix
  • More astonishing KDE4 screen-shots

    More astonishing KDE4 screen-shots!, from digg.

    KDE4 太華麗了! 看起來和 Windows Vista 超像的~ 不過和 Windows 的 GUI framework 迥然不同的 Unix-like Operation System, 會跑的順嗎?

    一台剛裝完 Vista 的 1G RAM 的機器, 就會用掉八百多 MB 的記憶體, 不知道 KDE4 會是怎樣的 monster 呢? :p

    Popularity: 15% [?]

  • 0 Comments
  • Filed under: IT, Unix, What's New