1.版本:
[root@orange3c ~]# lsb_release -a
LSB
Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Release: 4
Codename: NahantUpdate7
2.下载 #wget http://v.xok.cc/linux/install/others/yum-2.0.8-1.src.rpm 或 http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm
3.安装
[root@orange3c opt]# rpmbuild --rebuild /opt/yum-2.0.8-1.src.rpm
Installing /opt/yum-2.0.8-1.src.rpm
warning: user skvidal does not exist - using root
warning: group skvidal does not exist - using root
warning: user skvidal does not exist - using root
warning: group skvidal does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.40879
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf yum-2.0.8
+ /bin/gzip -dc /usr/src/redhat/SOURCES/yum-2.0.8.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd yum-2.0.8
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.40879
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd yum-2.0.8
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -m64'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -m64'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -m64'
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ ./configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=noarch-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating bin/Makefile
config.status: creating etc/Makefile
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating po/Makefile
+ make
for subdir in bin etc docs po ; do \\
make -C $subdir ; \\
done
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
for cat in cs.po es.po ru.po uk.po; do \\
lang=`basename $cat .po`; \\
if msgmerge -v $lang.po yum.pot > $lang.pot ; then \\
mv -f $lang.pot $lang.po ; \\
echo \"msgmerge -v of $lang succeeded\" ; \\
else \\
echo \"msgmerge -v of $lang failed\" ; \\
rm -f $lang.pot ; \\
fi \\
done
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of cs succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of es succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 11.
msgmerge -v of ru succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of uk succeeded
msgfmt --statistics --verbose -o cs.mo cs.po
193 translated messages.
msgfmt --statistics --verbose -o es.mo es.po
178 translated messages, 8 fuzzy translations, 7 untranslated messages.
msgfmt --statistics --verbose -o ru.mo ru.po
170 translated messages, 12 fuzzy translations, 11 untranslated messages.
msgfmt --statistics --verbose -o uk.mo uk.po
193 translated messages.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.22235
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd yum-2.0.8
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' /var/tmp/yum-2.0.8root '!=' / ']'
+ rm -rf /var/tmp/yum-2.0.8root
+ make DESTDIR=/var/tmp/yum-2.0.8root install
for subdir in bin etc docs po ; do \\
make -C $subdir ; \\
done
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
for cat in cs.po es.po ru.po uk.po; do \\
lang=`basename $cat .po`; \\
if msgmerge -v $lang.po yum.pot > $lang.pot ; then \\
mv -f $lang.pot $lang.po ; \\
echo \"msgmerge -v of $lang succeeded\" ; \\
else \\
echo \"msgmerge -v of $lang failed\" ; \\
rm -f $lang.pot ; \\
fi \\
done
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of cs succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of es succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 11.
msgmerge -v of ru succeeded
....................
Read 1 old + 1 reference, merged 194, fuzzied 0, missing 0, obsolete 0.
msgmerge -v of uk succeeded
msgfmt --statistics --verbose -o ru.mo ru.po
170 translated messages, 12 fuzzy translations, 11 untranslated messages.
msgfmt --statistics --verbose -o uk.mo uk.po
193 translated messages.
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
./mkinstalldirs /var/tmp/yum-2.0.8root/usr/bin /var/tmp/yum-2.0.8root/etc /var/tmp/yum-2.0.8root/usr/share/yum /var/tmp/yum-2.0.8root/usr/share/man/man8 /var/tmp/yum-2.0.8root/usr/share/man/man5 /var/tmp/yum-2.0.8root/var/cache/yum/
mkdir /var/tmp/yum-2.0.8root
mkdir /var/tmp/yum-2.0.8root/usr
mkdir /var/tmp/yum-2.0.8root/usr/bin
mkdir /var/tmp/yum-2.0.8root/etc
mkdir /var/tmp/yum-2.0.8root/usr/share
mkdir /var/tmp/yum-2.0.8root/usr/share/yum
mkdir /var/tmp/yum-2.0.8root/usr/share/man
mkdir /var/tmp/yum-2.0.8root/usr/share/man/man8
mkdir /var/tmp/yum-2.0.8root/usr/share/man/man5
mkdir /var/tmp/yum-2.0.8root/var
mkdir /var/tmp/yum-2.0.8root/var/cache
mkdir /var/tmp/yum-2.0.8root/var/cache/yum
for module
in ./pullheaders.py ./config.py ./nevral.py ./logger.py ./yumlock.py ./yummain.py ./i18n.py ./pkgaction.py ./serverStuff.py ./archwork.py ./callback.py ./clientStuff.py ./iutil.py ./lilocfg.py ./lilo.py ./grubcfg.py ./checkbootloader.py ./bootloadercfg.py ./up2datetheft.py ./keepalive.py ./urlgrabber.py ./progress_meter.py ./yumcomps.py ./failover.py ./comps.py ./rpmUtils.py ; do \\
/usr/bin/install -c -m 644 ./$module /var/tmp/yum-2.0.8root/usr/share/yum ; \\
done
for subdir in bin etc docs po ; do \\
make -C $subdir install ; \\
done
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make -C .. installdirs
make[2]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8'
./mkinstalldirs /var/tmp/yum-2.0.8root/usr/bin /var/tmp/yum-2.0.8root/etc /var/tmp/yum-2.0.8root/usr/share/yum /var/tmp/yum-2.0.8root/usr/share/man/man8 /var/tmp/yum-2.0.8root/usr/share/man/man5 /var/tmp/yum-2.0.8root/var/cache/yum/
make[2]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8'
/usr/bin/install -c -m 755 ../bin/yum-arch /var/tmp/yum-2.0.8root/usr/bin/yum-arch
/usr/bin/install -c -m 755 ../bin/yum /var/tmp/yum-2.0.8root/usr/bin/yum
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/bin'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make -C .. installdirs
make[2]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8'
./mkinstalldirs /var/tmp/yum-2.0.8root/usr/bin /var/tmp/yum-2.0.8root/etc /var/tmp/yum-2.0.8root/usr/share/yum /var/tmp/yum-2.0.8root/usr/share/man/man8 /var/tmp/yum-2.0.8root/usr/share/man/man5 /var/tmp/yum-2.0.8root/var/cache/yum/
make[2]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8'
../mkinstalldirs /var/tmp/yum-2.0.8root/etc/{cron.daily,init.d,logrotate.d}
mkdir /var/tmp/yum-2.0.8root/etc/cron.daily
mkdir /var/tmp/yum-2.0.8root/etc/init.d
mkdir /var/tmp/yum-2.0.8root/etc/logrotate.d
/usr/bin/install -c -m 644 ../etc/yum.conf /var/tmp/yum-2.0.8root/etc/yum.conf
/usr/bin/install -c ../etc/yum.cron
/var/tmp/yum-2.0.8root/etc/cron.daily/yum.cron
/usr/bin/install -c ../etc/yum.init /var/tmp/yum-2.0.8root/etc/init.d/yum
/usr/bin/install -c -m 644 ../etc/yum.logrotate /var/tmp/yum-2.0.8root/etc/logrotate.d/yum
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/etc'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make -C .. installdirs
make[2]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8'
./mkinstalldirs /var/tmp/yum-2.0.8root/usr/bin /var/tmp/yum-2.0.8root/etc /var/tmp/yum-2.0.8root/usr/share/yum /var/tmp/yum-2.0.8root/usr/share/man/man8 /var/tmp/yum-2.0.8root/usr/share/man/man5 /var/tmp/yum-2.0.8root/var/cache/yum/
make[2]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8'
/usr/bin/install -c -m 644 ../docs/yum.8
/var/tmp/yum-2.0.8root/usr/share/man/man8/yum.8
/usr/bin/install -c -m 644 ../docs/yum-arch.8
/var/tmp/yum-2.0.8root/usr/share/man/man8/yum-arch.8
/usr/bin/install -c -m 644 ../docs/yum.conf.5
/var/tmp/yum-2.0.8root/usr/share/man/man5/yum.conf.5
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/docs'
make[1]: Entering directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
`cs.mo' ->
`/var/tmp/yum-2.0.8root/usr/share/locale/cs/LC_MESSAGES/yum.mo'
`es.mo' ->
`/var/tmp/yum-2.0.8root/usr/share/locale/es/LC_MESSAGES/yum.mo'
`ru.mo' ->
`/var/tmp/yum-2.0.8root/usr/share/locale/ru/LC_MESSAGES/yum.mo'
`uk.mo' ->
`/var/tmp/yum-2.0.8root/usr/share/locale/uk/LC_MESSAGES/yum.mo'
make[1]: Leaving directory `/usr/src/redhat/BUILD/yum-2.0.8/po'
+ /usr/lib/rpm/redhat/find-lang.sh /var/tmp/yum-2.0.8root yum
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/yum-2.0.8
0 blocks
find: /var/tmp/yum-2.0.8root/usr/lib/debug: No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: yum-2.0.8-1
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.14568
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd yum-2.0.8
+ DOCDIR=/var/tmp/yum-2.0.8root/usr/share/doc/yum-2.0.8
+ export DOCDIR
+ rm -rf /var/tmp/yum-2.0.8root/usr/share/doc/yum-2.0.8
+ /bin/mkdir -p /var/tmp/yum-2.0.8root/usr/share/doc/yum-2.0.8
+ cp -pr README AUTHORS COPYING TODO INSTALL ChangeLog /var/tmp/yum-2.0.8root/usr/share/doc/yum-2.0.8
+ exit 0
Provides: config(yum) = 2.0.8-1
Requires(interp): /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires: /bin/bash /bin/sh /usr/bin/python config(yum) = 2.0.8-1 libxml2-python python rpm >= 0:4.1.1 rpm-python
Obsoletes: yum-phoebe
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/yum-2.0.8root
Wrote: /usr/src/redhat/RPMS/noarch/yum-2.0.8-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.61722
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd yum-2.0.8
+ '[' /var/tmp/yum-2.0.8root '!=' / ']'
+ rm -rf /var/tmp/yum-2.0.8root
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.61722
+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf yum-2.0.8
+ exit 0
[root@orange3c opt]# cd /usr/src/redhat/RPMS/noarch/
[root@orange3c noarch]# ll
total 136
-rw-r--r-- 1 root root 134368 Jul 20 13:58 yum-2.0.8-1.noarch.rpm
[root@orange3c noarch]# rpm -ivh yum-2.0.8-1.noarch.rpm
Preparing... ########################################### [100%]
1:yum ########################################### [100%]
4.配置
[root@orange3c noarch]# vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
[base]
name=Red Hat Linux $releasever - $basearch - Base
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
baseurl=http://vault.centos.org/4.7/updates/i386/
[updates]
name=Red Hat Linux $releasever - Updates
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/
baseurl=http://vault.centos.org/4.7/updates/i386/
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
[base]
name=Red Hat Linux $releasever - $basearch - Base
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
#baseurl=http://vault.centos.org/4.7/updates/i386/
#baseurl=http://centos.ustc.edu.cn/centos/4.8/updates/i386/
baseurl=http://mirrors.163.com/centos/4.8/os/i386/
[updates]
name=Red Hat Linux $releasever - Updates
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/
#baseurl=http://vault.centos.org/4.7/updates/i386/
baseurl=http://mirrors.163.com/centos/4.8/updates/i386/
[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.centos.org/centos/4.8/updates/i386/
因篇幅问题不能全部显示,请点此查看更多更全内容