Linux builds an FTP-based yum server

Source: Internet
Author: User
Tags gpg

1. Mount the disc

Mount/dev/cdrom/mnt

2, install VSFTP service, Createrepo package

RPM-IVH vsftpd-2.0.5-24.el5.x86_64.rpm

RPM-IVH createrepo-0.4.11-3.el5.noarch.rpm

3. Copy Disc contents

Cp-a/mnt/*/var/ftp/pub/

4. Create a Yum repository

cd/var/ftp/pub/

Createrepo.

Createrepo Error The following solution

Workaround:

[Email protected] ~]# vi/usr/share/createrepo/genpkgmetadata.py
#!/usr/bin/python2.4--Modify python-t to pthhon2.4

5. Start the FTP service

Service VSFTPD Start

Chkconfig vsftpd on

The client uses the Yum source method:

[Email protected] yum.repos.d]# pwd
/etc/yum.repos.d
[email protected] yum.repos.d]# cat Local.repo
[Server]
name=red Hat Enterprise Linux 5
Baseurl=ftp://192.168.120.58/pub/server
Enabled=1
Gpgcheck=1
Gpgkey=ftp://192.168.120.58/pub/rpm-gpg-key-redhat-release
[VT]
name=red Hat Enterprise Linux 5
Baseurl=ftp://192.168.120.58/pub/vt
Enabled=1
Gpgcheck=1
Gpgkey=ftp://192.168.120.58/pub/rpm-gpg-key-redhat-release
[Cluster]
name=red Hat Enterprise Linux 5
Baseurl=ftp://192.168.120.58/pub/cluster
Enabled=1
Gpgcheck=1
Gpgkey=ftp://192.168.120.58/pub/rpm-gpg-key-redhat-release
[Clusterstorage]
name=red Hat Enterprise Linux 5
Baseurl=ftp://192.168.120.58/pub/clusterstorage
Enabled=1
Gpgcheck=1
Gpgkey=ftp://192.168.120.58/pub/rpm-gpg-key-redhat-release

Test Yum List!ok

Linux builds an FTP-based yum server

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.