1. The Linux installation disk is inserted into the optical drive (connected, connected when enabled, using ISO image file)
2. Mount the optical drive
[Email protected] ~]# mount/dev/cdrom/mnt/
Mount:block Device/dev/sr0 is write-protected, mounting read-only
[Email protected] ~]#
3. Install the CREATEREPO package---> This is a tool to resolve dependencies
[Email protected] ~]# cd/mnt/packages/
[Email protected] packages]# RPM-IVH createrepo-0.9.9-17.el6.noarch.rpm 
Warning:createrepo-0.9.9-17.el6.noarch.rpm:header V3 RSA/SHA256 Signature, key ID fd431d51:nokey 
error:failed Dependencies: 
python-deltarpm is needed by Createrepo-0.9.9-17.el6.noarch 
[[email protected] packages]# RPM-IVH Python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm 
Warning: Python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm:header V3 rsa/sha256 Signature, key ID fd431d51:nokey 
error:failed dependencies: 
deltarpm = 3.5-0.5.20090913git.el6 is needed by Python-deltarpm-3.5-0.5.20090913git.el6.x86_64
[Email protected] packages]# RPM-IVH deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
Warning:deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm:header V3 rsa/sha256 Signature, key ID Fd431d51:nokey
Preparing ... ########################################### [100%]
1:deltarpm ########################################### [100%]
[Email protected] packages]# RPM-IVH python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
Warning:python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm:header V3 rsa/sha256 Signature, key ID Fd431d51:nokey
Preparing ... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[Email protected] packages]# RPM-IVH createrepo-0.9.9-18.el6.noarch.rpm
Warning:createrepo-0.9.9-18.el6.noarch.rpm:header V3 rsa/sha256 Signature, key ID Fd431d51:nokey
Preparing ... ########################################### [100%]
1:createrepo ########################################### [100%]
4. Copy the RPM package from the optical drive into the system and create the corresponding directory
[Email protected]lhost packages]# Mkdir-pv/var/yum
mkdir:created directory '/var/yum/pub '
[Email protected] packages]# cp-r packages/var/yum/
Second, start to build Yum
1. Build dependencies
[Email protected] packages]# createrepo-g/var/yum/repodata/ 6221039e7e3dabf7d538c76571d82aaf42b6292b8f6fe6cf56b8fcf1cff3d3ab-comps-rhel6-server.xml/var/yum/packages/
Spawning worker 0 with 3763 pkgs
Workers finished
Gathering worker Results
Saving Primary Metadata
Saving file lists Metadata
Saving other metadata
Generating SQLite DBs
Sqlite DBs Complete
[Email protected] packages]# cd/etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
Packagekit-media.repo Rhel-source.repo
[email protected] yum.repos.d]# CP Rhel-source.repo Rhel-source.repo.bak
[Email protected] ~]# cd/etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
Rhel-source.repo
[email protected] yum.repos.d]# CP Rhel-source.repo Rhel-source.repo.bak
[Email protected] yum.repos.d]# vim Rhel-source.repo
[Myyum]
Name=redhat Myyum
baseurl=file:///var/yum/packages/
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
[email protected] yum.repos.d]# Yum grouplist
Loaded Plugins:product-id, Refresh-packagekit, security, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Setting up Group Process
Rhel-source | 3.8 KB 00:00 ...
Rhel-source-beta | 3.8 KB 00:00 ...
rhel-source-beta/primary_db | 3.2 MB 00:00 ...
Rhel-source/group_gz | 204 KB 00:00 ...
Rhel-source-beta/group_gz | 204 KB 00:00 ...
Installed Groups:
Additional Development
Base
Compatibility libraries
Desktop
Dial-up Networking Support
Directory Client
e-mail server
Fonts
General Purpose Desktop
Graphical Administration Tools
Hardware Monitoring Utilities
Internet Browser
Legacy UNIX Compatibility
Legacy X Window System compatibility
Network Infrastructure Server
Networking Tools
Performance Tools
Perl Support
Print Server
Printing Client
SNMP Support
Security Tools
Web Server
X Window System
Installed Language Groups:
Arabic support [AR]
Armenian support [Hy]
Bhutanese support [DZ]
Chinese support [en]
Ethiopic Support [AM]
Georgian support [Ka]
Hebrew support [He]
Inuktitut support [IU]
Japanese support [JA]
Khmer support [Miles]
Konkani support [Kok]
Korean support [KO]
Kurdish support [KU]
Lao support [Lo]
Myanmar (Burmese) support [my]
Tajik support [TG]
Venda support [VE]
Available Groups:
Backup Client
Backup Server
CIFS File Server
Client Management Tools
Console Internet Tools
Debugging Tools
Desktop Debugging and Performance Tools
Desktop Platform
Desktop Platform Development
Development tools
Directory Server
Eclipse
Emacs
FCoE Storage Client
FTP Server
Graphics Creation Tools
Identity Management Server
Infiniband Support
Input Methods
Java Platform
KDE Desktop
Large Systems Performance
Mainframe Access
Messaging Client Support
MySQL Database Client
MySQL Database Server
NFS File Server
Network Storage Server
Network File System Client
PHP Support
PostgreSQL Database Client
PostgreSQL Database Server
Remote Desktop Clients
Ruby Support
Scientific support
Server Platform
Server Platform Development
Smart Card Support
Storage Availability Tools
System Management
System Administration Tools
TeX Support
Technical Writing
TurboGears Application Framework
Virtualization
Virtualization Client
Virtualization Platform
Virtualization Tools
Web Servlet Engine
web-based Enterprise Management
ISCSI Storage Client
Available Language Groups:
Afrikaans support [AF]
Albanian support [Sq]
Amazigh support [BER]
Assamese support [as]
Azerbaijani support [AZ]
Basque support [EU]
Belarusian support [be]
Bengali support [Bn]
Brazilian Portuguese support [PT_BR]
Breton support [BR]
Bulgarian support [BG]
Catalan support [CA]
Chhattisgarhi support [Hne]
Chichewa support [NY]
Coptic support [COP]
Croatian support [HR]
Czech support [CS]
Danish support [da]
Dutch support [NL]
中文版 (UK) support [EN_GB]
Esperanto support [EO]
Estonian support [ET]
Faroese support [FO]
Fijian support [FJ]
Filipino support [fil]
Finnish support [fi]
French support [FR]
Frisian support [FY]
Friulian support [fur]
Gaelic support [GD]
Galician support [GL]
German support [de]
Greek support [El]
Gujarati support [Gu]
Hiligaynon support [Hil]
Hindi support [Hi]
Hungarian support [Hu]
Icelandic support [IS]
Indonesian support [ID]
Interlingua support [IA]
Irish support [GA]
Italian support [It]
Kannada support [kn]
Kashmiri support [KS]
Kashubian support [CSB]
Kazakh support [KK]
Kinyarwanda support [RW]
Latin support [La]
Latvian support [LV]
Lithuanian support [LT]
Low Saxon support [NDS]
Luxembourgish support [LB]
Macedonian support [MK]
Maithili support [Mai]
Malagasy support [MG]
Malay support [MS]
Malayalam support [ML]
Maltese support [MT]
Manx support [GV]
Maori support [MI]
Marathi support [Mr]
Mongolian support [MN]
Nepali support [NE]
Northern Sotho support [NSO]
Norwegian support [NB]
Occitan support [OC]
Oriya support [or]
Persian support [FA]
Polish support [PL]
Portuguese support [PT]
Punjabi support [PA]
Romanian support [RO]
Russian support [RU]
Sanskrit support [SA]
Sardinian support [SC]
Serbian support [SR]
Sindhi support [SD]
Sinhala support [Si]
Slovak support [SK]
Slovenian support [SL]
Somali support [so]
Southern Ndebele support [nr]
Southern Sotho support [St]
Spanish support [es]
Swahili support [SW]
Swati support [SS]
Swedish support [SV]
Tagalog support [TL]
Tamil support [TA]
Telugu support [Te]
Tetum support [Tet]
Thai support [th]
Tibetan support [Bo]
Tsonga support [TS]
Tswana support [TN]
Turkish support [TR]
Turkmen support [TK]
Ukrainian support [UK]
Upper Sorbian support [HSB]
Urdu support [ur]
Uzbek support [UZ]
Vietnamese support [VI]
Walloon support [WA]
WELSH support [CY]
Xhosa support [XH]
Zulu support [zu]
Done
It takes some time.
Redhat Linux6.5 to build local Yum source