Set up the yum source server (FTP) under RedHat5)

Source: Internet
Author: User
Tags gpg
RedHat5 sets up yum source server (FTP) 1. Start redhat5 and put the CD in, mount it to/media/cdrommkdir/media/cdrommount/dev/cdrom/media/cdrom2 and install the FTP service (skip this step if the local machine is used) cd/media/cdrom/Serverrpm-ivhvsftpd * chkconfigvsftpd

RedHat5 yum source server (FTP)

1. Start redhat5, put the disc in, and mount it to/media/cdrom.
Mkdir/media/cdrom
Mount/dev/cdrom/media/cdrom

2. Install the FTP service (skip this step if the local machine is used)
Cd/media/cdrom/Server
Rpm-ivh vsftpd *
Chkconfig vsftpd on
Service vsftpd start

3. Install the createrepo Software Package
Rpm-ivh createrepo *

4. copy the files in the system disk to the local machine.
Cp-R/media/cdrom/Server/var/ftp/pub

5. Generate the yum Source

(1) generating dependency
Createrepo-g/var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml/var/ftp/pub/Server
If the prompt "cocould not remove old metadata dir:. olddata" says there is a directory problem and you don't have to worry about it. Just delete the directory.
Rm-rf/var/ftp/pub/Server/. olddata
Then, repeat the operation.

(2) create a repository file
Vim/etc/yum. repos. d/yum. repo
[Yum-ftp]
Name = base
Baseurl = ftp: // ip/pub/Server
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
You can directly use yum to install rpm next time.

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.