RHEL6 system configuration use local yum source

Source: Internet
Author: User
1. mount the CD root @ instructor ~] # Cd/root/[root @ instructor ~] # MkdirDVDroot @ instructor ~] # Mount-tiso9660/dev/cdrom2DVD2. install vsftpd [root @ instructor ~] # CdDVD/Packages [root @ U 1. attach a CD
Root @ instructor ~] # Cd/root/
[Root @ instructor ~] # Mkdir DVD
Root @ instructor ~] # Mount-t iso9660/dev/cdrom2 DVD
2. install vsftpd
[Root @ instructor ~] # Cd DVD/Packages
[Root @ instructor ~] # Rpm civl vsftpd *
Root @ instructor ~] # Service vsftpd start # start ftp
3. create an ftp installation directory
[Root @ instructor ~] # Cd/var/ftp/pub
[Root @ instructor ~] # Mkdir rhel6
[Root @ instructor ~] # Cd DVD
[Root @ instructor ~] # Cp-rf */var/ftp/pub/rhel6
[Root @ instructor ~] # Cd C # Return/var/ftp/pub
[Root @ instructor ~] # Rm-f *. html # DELETE *. html
[Root @ instructor ~] # Cd Server/repodata/
[Root @ instructor repodata] # rm-f TRANS. TBL # Delete Server/repodata/TRANS. TBL
[Root @ instructor repodata] # rm-f/var/ftp/pub/rhel6/HighAvailability/repodata/TRANS. TBL
[Root @ instructor repodata] # rm-f/var/ftp/pub/rhel6/LoadBalancer/repodata/TRANS. TBL
[Root @ instructor repodata] # rm-f/var/ftp/pub/rhel6/ResilientStorage/repodata/TRANS. TBL
[Root @ instructor repodata] # rm-f/var/ftp/pub/rhel6/ScalableFileSystem/repodata/TRANS. TBL
4. install createrepo and yum
# Install creatrepo and its dependent packages
[Root @ instructor repodata] # rpm-ivhdeltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[Root @ instructor repodata] # rpm-ivh python-deltarpm-3.5-
0.5.20090913git.el6.x86 _ 64.rpm
[Root @ instructor repodata] # rpm-ivhcreaterepo-0.9.8-4.el6.noarch.rpm
# Install yum and its dependent packages
[Root @ instructor repodata] # rpm-ivhpython-dateutil-1.4.1-6.el6.noarch.rpm
[Root @ instructor repodata] # rpm-ivh yum *
5. generate repodata
[Root @ instructor repodata] # createrepo-g/var/ftp/pub/rhel6/repodata/repomd. xml
/Var/ftp/pub/rhel6/
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
6828/20586-HighAvailability/Packages/libisofs-0.6.32-1.el6.x86_64.rpm
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
10259/20586-ResilientStorage/Packages/libisofs-0.6.32-1.el6.x86_64.rpm
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
13690/20586-Server/Packages/libisofs-0.6.32-1.el6.x86_64.rpm
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
17121/20586-Packages/libisofs-0.6.32-1.el6.x86_64.rpm
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
20552/20586-ScalableFileSystem/Packages/libisofs-0.6.32-1.el6.x86_64.rpm
ISO-8859-1 encoding on Ville Skytt? Ville.skytta@iki.fi>-2.8.2-2
20586/20586-ScalableFileSystem/Packages/libldb-0.9.10-23.el6.i686.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Cocould not remove old metadata dir:. olddata
Error was [Errno 20] Not a directory: '/var/ftp/pub/rhel6/. olddata'
Please clean up this directory manually.
[Root @ instructor rhel6] # cd
[Root @ instructor rhel6] # rm-f. olddata
6. modify the repo file

----- In the/etc/yum. repos. d Directory
[Root @ policuctor yum. repos. d] # rm-f packagekit-media.repo
[Root @ instructor yum. repos. d] # vi yum. repo
# The following is the yum. repo configuration. the locallhost ip address is 192.168.1.128.
[Server]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Server
# Baseurl = ftp: // 192.168.1.128/pub/rhel6
Base url = ftp://instructor.example.com/pub/rhel6
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Local-HA]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-HighAvailability
# Baseurl = ftp: // 192.168.1.128/pub/rhel6
Base url = ftp://instructor.example.com/pub/rhel6
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Local-LB]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-LoadBalancer
# Baseurl = ftp: // 192.168.1.128/pub/rhel6
Base url = ftp://instructor.example.com/pub/rhel6
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Local-RS]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-ResilientStorage
# Baseurl = ftp: // 192.168.1.128/pub/rhel6
Base url = ftp://instructor.example.com/pub/rhel6
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Root @ policuctor yum. repos. d] # yum clean all
Loaded plugins: refresh-packagekit, rhnplugin
Cleaning up Everything
[Root @ instructor yum. repos. d] # yum update
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Server | 1.9 kB
Server/primary | 9.4 MB
Servers 20586/20586
Local-HA | 1.9 kB: 00
Local-HA/primary | 9.4 MB
Local-HA 20586/20586
Local-LB | 1.9 kB
Local-LB/primary | 9.4 MB
Local-LB 20586/20586
Local-RS | 1.9 kB
Local-RS/primary | 9.4 MB
Local-RS 20586/20586
Setting up Update Process
No Packages marked for Update
After yum update, the following error occurs: metadata (repomd. xml) for repository: InstallMedia
Note the following two points:
1. packagekit-media.repo deletion
2. [root @ instructor yum. repos. d] # cd/usr/lib/python2.6/site-packages/yum
[Root @ instructor yum. repos. d] # vi yumRepo. py
# In command mode, enter: remove = enter
# Finding remote = url + '/' + relative indicates that the yum source must comply with the url
# Remote = "/var/ftp/pub/rhel6" + '/' + relative indicates that the yum source complies with the file format
7. test
[Root @ instructor yum. repos. d] # yum install binutils
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Package binutils-2.20.51.0.2-5.11.el6.x86_64 already installed andlatest version
Nothing to do
[Root @ instructor yum. repos. d] # yum install compat-lib *
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package compat-libcap1.x86_64. 10-1 set to beupdated
---> Package compat-libf2c-34.x86_64. 4.6-19. el6 set to beupdated
---> Package compat-libgfortran-41.x86_64. 1.2-39. el6 set tobe updated
---> Package compat-libstdc ++-296. i686 2. 96-144.el6 set to beupdated
--> Processing Dependency: libc. so.6 for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libc. so.6 (GLIBC_2.1) for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libm. so.6 (GLIBC_2.0) for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libc. so.6 (GLIBC_2.12) for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libc. so.6 (GLIBC_2.1.3) forpackage:
Compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libgcc_s.so.1 (GLIBC_2.0) for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libc. so.6 (GLIBC_2.0) for package: compat-libstdc ++-296-2.96-144.el6.i686
--> Processing Dependency: libm. so.6 for package: compat-libstdc ++-296-2.96-144.el6.i686
---> Package compat-libstdc ++-33. x86_64 3. 2.3-69. el6 set to beupdated
---> Package compat-libtermcap.x86_64. 0.8-49. el6 set to beupdated
--> Running transaction check
---> Package glibc. i686 0: 2. 12-1.7.el6 set to be updated
--> Processing Dependency: libfreebl3.so (NSSRAWHASH_3.12.3) forpackage: glibc-2.12-1.7.el6.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.7.el6.i686
---> Package libgcc. i686. 4.4-13. el6 set to be updated
--> Running transaction check
---> Package nss-softokn-freebl.i686. 12.7-1.1.el6 set to beupdated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================== ========================================================== ========================================================
Package Arch Version Repository Size
========================================================== ========================================================== ========================================================
Installing:
Compat-libcap1 x86_64 1.10-1 Server 17 k
Compat-libf2c-34 x86_64 3.4.6-19. el6 Server 51 k
Compat-libgfortran-41 x86_64 4.1.2-39. el6 Server 126 k
Compat-libstdc ++-296 i686 2.96-144. el6 Server 77 k
Compat-libstdc ++-33 x86_64 3.2.3-69. el6 Server 183 k
Compat-libtermcap x86_64 2.0.8-49. el6 Server 16 k
Installing for dependencies:
Glibc i686 2.12-1.7.el6 Server 4.3 M
Libgcc i686 4.4.4-13. el6 Server 104 k
Nss-softokn-freebl i686 3.12.7-1.1.el6 Server 109 k
Transaction Summary
========================================================== ========================================================== ========================================================
Install 9 Package (s)
Upgrade 0 Package (s)
Total download size: 4.9 M
Installed size: 15 M
Is this OK [y/N]: y
Downloading Packages:
(1/9): compat-libcap1-1.10-1.x86_64.rpm | 17 kB
(2/9): compat-libf2c-34-3.4.6-19.el6.x86_64.rpm | 51 kB
(3/9): compat-libgfortran-41-4.1.2-39.el6.x86_64.rpm | 126 kB00: 00
(4/9): compat-libstdc ++-296-2.96-144.el6.i686.rpm | 77 kB
(5/9): compat-libstdc ++-33-3.2.3-69.el6.x86_64.rpm | 183 kB00: 00
(6/9): compat-libtermcap-2.0.8-49.el6.x86_64.rpm | 16 kB
(7/9): glibc-2.12-1.7.el6.i686.rpm | 4.3 MB
(8/9): libgcc-4.4.4-13.el6.i686.rpm | 104 kB
(9/9): nss-softokn-freebl-3.12.7-1.1.el6.i686.rpm | 109 kB00: 00
Bytes -----------------------------------------------------------------------------------------------------------------------
Total 7.4 MB/s | 4.9 MB
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libgcc-4.4.4-13.el6.i686 1/9
Installing: nss-softokn-freebl-3.12.7-1.1.el6.i686 2/9
Installing: glibc-2.12-1.7.el6.i686 3/9
Installing: compat-libgfortran-41-4.1.2-39.el6.x86_64 4/9
Installing: compat-libcap1-1.10-1.x86_64 5/9
Installing: compat-libf2c-34-3.4.6-19.el6.x86_64 6/9
Installing: compat-libstdc ++-33-3.2.3-69.el6.x86_64 7/9
Installing: compat-libtermcap-2.0.8-49.el6.x86_64 8/9
Installing: compat-libstdc ++-296-2.96-144.el6.i686 9/9
Installed:
Compat-libcap1.x86_64. 10-1 compat-libf2c-34.x86_640: 3.4.6-19. el6
Compat-libgfortran-41.x86_64. 1.2-39. el6compat-libstdc ++-296. i686. 96-144.el6
Compat-libstdc ++-33. x86_64. 2.3-69. el6 compat-libtermcap.x86_640: 2.0.8-49. el6
Dependency Installed:
Glibc. i686 2. 12-1.7.el6 libgcc. i686 4. 4.4-13. el6nss-softokn-freebl.i686. 12.7-1.1.el6
Complete!

Related Article

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.