Install yum in Linux4.7

Source: Internet
Author: User

1. Version:

[Root @ orange3c ~] # Lsb_release-
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. Download

# Wget http://v.xok.cc/linux/install/others/yum-2.0.8-1.src.rpm

Or http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm

 

3. Install

[Root @ orange3c opt] # rpm build -- 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. M'-> '/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. M'-> '/var/tmp/yum-2.0.8root/usr/share/locale/ru/LC_MESSAGES/yum.mo'
'Uk. M'-> '/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
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> =. 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 -- 1 root 134368 Jul 20 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. Configuration

[Root @ orange3c noarch] # vim/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://developer.dulug.duke.edu/pub/yum-repository/redhat/?releasever/#basearch/
Base url = http://vault.centos.org/4.7/updates/i386/

[Updates]
Name = Red Hat Linux $ releasever-Updates
# Baseurl = http://developer.dulug.duke.edu/pub/yum-repository/redhat/updates/#releasever/
Base url = 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://developer.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/
Base url = http://mirrors.163.com/centos/4.8/ OS /i386/

[Updates]
Name = Red Hat Linux $ releasever-Updates
# Baseurl = http://developer.dulug.duke.edu/pub/yum-repository/redhat/updates/#releasever/
# Baseurl = http://vault.centos.org/4.7/updates/i386/
Base url = http://mirrors.163.com/centos/4.8/updates/i386/

[Updates]
Name = Red Hat Linux $ releasever-Updates
Base url = http://mirror.centos.org/centos/4.8/updates/i386/

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.