Build a local yum source in RedhatLinux6.4

Source: Internet
Author: User
I. Preparations 1. Insert the Linux installation disk into the optical drive 2. Mount the optical drive [root @ localhost ~] # Mount/dev/cdrom/mnt/mount: blockdevice/dev/sr0iswrite-protected, mountingread-only [root @ localhost ~] #3. Install the createrepo package --- & gt;

I. Preparations
1. Insert an optical drive into the Linux installation disk

2. Mount the optical drive
[Root @ localhost ~] # Mount/dev/cdrom/mnt/
Mount: block device/dev/sr0 is write-protected, mounting read-only
[Root @ localhost ~] #

3. Install the createrepo package ---> This is a tool for solving dependencies.
[Root @ localhost ~] # Cd/mnt/Packages/
[Root @ localhost 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
[Root @ localhost 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
[Root @ localhost 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%]
[Root @ localhost 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%]
[Root @ localhost 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
Preparing... ######################################## ### [100%]
1: createrepo ####################################### #### [100%]
[Root @ localhost Packages] #

4. Copy the rpm package in the optical drive to the system and create the corresponding directory.
[Root @ localhost Packages] # mkdir-pv/var/ftp/pub
Mkdir: created directory '/var/ftp'
Mkdir: created directory '/var/ftp/pub'
[Root @ localhost Packages] # cp-R/mnt/Packages/var/ftp/pub/

 
Ii. Start to build yum
1. generate dependency
[Root @ localhost Packages] # createrepo-g/mnt/repodata/cda5429be6f36ce1348e8f897f4fc96aa00d5727c75e9e5a0b5dc40d22a51116-comps-rhel6-Server.xml/var/ftp/pub/Packages/
Spawning worker 0 with 3720 pkgs
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

2. Edit the yum repository configuration file
[Root @ localhost ~] # Cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # ls
Rhel-source.repo
[Root @ localhost yum. repos. d] # cp rhel-source.repo rhel-source.repo.bak
[Root @ localhost yum. repos. d] # vim rhel-source.repo.
[Myyum]
Name = RedHat Myyum
Baseurl = file: // var/ftp/pub/Packages/
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

3. Now, the local yum version 6.4 has been installed and can be used properly.
[Root @ localhost yum. repos. d] # yum grouplist
Loaded plugins: product-id, refresh-packagekit, security, subrole-manager
This system is not registered to Red Hat sub‑management. You can use sub‑manager to register.
Setting up Group Process
Myyum | 3.8 kB...
Myyum/primary_db | 3.1 MB...
Myyum/group_gz | 204 kB...
Installed Groups:
Additional Development
Base
Debugging Tools
Desktop
Desktop Debugging and Performance Tools
Desktop Platform
Dial-up Networking Support
Directory Client
Network file system client
Assamese Support [as]
Available Language Groups:
Afrikaans Support [af]
Albanian Support [sq]
Amazigh Support [ber]
Azerw.jani Support [az]
Ukrainian Support [uk]
Upper Sorbian Support [hsb]
Uzbek Support [uz]
Vietnamese Support [vi]
Walloon Support [wa]
Welsh Support [cy]
Xhosa Support [xh]
Zulu Support [zu]
Done
[Root @ localhost yum. repos. d] #

OK !!!

Recommended reading:

Configuration http://www.linuxidc.com/Linux/2013-08/88217.htm for local yum sources in RedHat Linux

RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm

Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm

Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm

Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm

Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1

YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.