Add the Fedora13 installation disk as the disc Source

Source: Internet
Author: User
How to mount Fedora13iso to a local mounted iso image file: # mountFedora-13-i386-DVD.iso-tiso9660-oloop/mnt/cdrom/If Fedora13 enables the auto mount feature, it will automatically mount the disc to/media. Disk mounting method: # mount-tiso9660-oloop/dev/sr0/

Mount Fedora 13 iso to a local device

How to mount an iso image file:

# Mount Fedora-13-i386-DVD.iso-t iso9660-o loop/mnt/cdrom/

If ora 13 Enables automatic mounting, it will automatically mount the disc to/media.

How to mount a CD:

# Mount-t iso9660-o loop/dev/sr0/mnt/cdrom/

Back up the original repos configuration file

# Cd/etc/yum. repos. d/

# Mkdir backup

# Mv *. repo backup/

You can also use the tar command to back up data in one step.

Tar czf/home/repo.tar.gz/etc/yum. repos. d

Decompress the file with zxvf.

After the backup, set/etc/yum. repos. d/clear the directory or set enabled to 0 in each repo file to disable other sources. Otherwise, "Error: cannot retrieve repository metadata (repomd. xml) for repository: updates-released. please verify its path and try again. ."

Copy and install the Packages directory on the CD to/home. Because the CD cannot be written, you need the write permission to create the yum database file and information index file. Therefore, copy these rpm packages to a directory with write permission.

# Cp/mnt/cdrom/Packages/home

Create a new repos File

# Cdrom. repo:

[Cdrom]

Name = cdrom

Baseurl = file: // home/Packages

Enabled = 1

Gpgcheck = 0

; Gpgkey = file: /// mnt/cdrom/RPM-GPG-KEY-fedora-i386

Save and exit

ZZ

Install the rpm package of createrepo, which is included in the CD. A dependency package is required during installation, and is also available in the installation disk.

# Rpm-ivh createrepo *. rpm

Install yum database files and information index files (this step is important)

Createrepo-g/mnt/cdrom/repodata/repomd. xml/home/Packages

Refresh yum Cache

# Yum clean all

# Yum makecache

Extended: using the above ideas, you can copy the installation CD and common software packages to a server in the LAN, and then direct the yum source of other clients to this server, yum can be installed on the LAN. An example is provided below:

I. Experiment on two computers

1: Server RedHat Enterprise 5

Ip: 192.168.1.112

2: client RedHat Enterprise 5

Ip: 192.168.1.113

3: servers and clients can ping each other

Ii. Server Configuration:

1: Create the directory networkyum for storing the DVD Disc package under the/home/directory.

Run mkdir-p/home/networkyum

2: mount the DVD drive to/mnt/

Run the command: mount/dev/hdc/mnt/

3: Copy all files and subdirectories under v/mnt/Server/to/home/networkyum /.

Run the command cp/mnt/Server/*. */home/networkyum/

4: Install the rpm package createrepo

Run the command: rpm-ivh createrepo ...... ... . I386.rpm

5. Install the yum database file and information index file.

Run the following command: createrepo-g/home/networkyum/Server/repodata/compsrhel5-

Server-core.xml/home/networkyum/Serve

Iii. Client Configuration:

1: connect to the YUM repository of the server and create the file extension. repo in the/etc/yum. repos. d/directory.

File Name

Run the command: touch/etc/yum. repos. d/ftpyum. repo

2. Modify the ftpyum. repo file.

Run the command: vi/etc/yum. repos. d/ftpyum. repo

3: configuration file ftpyum. repo content:

[Server-ftp]

Name = Server-ftp

Baseurl = ftp: // 192.168.1.112/home/networkyum/Server

Enabled = 1

Gpgcheck = 0

4: Clear cache and refresh list

Run the command: yum clean all

Run the command: yum list

5: Test

Run the command: yum install dhcp

6: Completed Successfully

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.