RHEL5 configure the yum repository through FTP

Source: Internet
Author: User
Source code package: it has great advantages in terms of customization functions, but it also brings a burden to administrators. enterprises generally use scripts to solve the yum Repository: yum has great advantages in deploying software on a large-scale server group. Yum is called YellowdogUpdater and Modified (Package Manager) we also called it "& ldquo; yellow dog & rdquo;" when joking. The main function is to conveniently Add/delete/update RPM packages. yum can check linux

Source code package: it has great advantages in terms of customization functions, but it also brings a burden to administrators. enterprises generally use scripts to solve this problem.
Yum Repository: it has great advantages in deploying software on a large-scale server group. It can check for updates, updates, installation, and uninstallation.

Yum Introduction
Yum is called Yellow dog Updater. Modified (Package Manager) is also called "Yellow dog" when we joke"
The main function is to conveniently Add/delete/update RPM packages. yum can check the dependency between software packages installed in linux and automatically install all dependent software packages, it facilitates management of a large number of system updates,
Multiple resource libraries can be set at the same time, and it is very easy to use.

Recommended reading:

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

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

The following describes how to configure a repository on RHEL5:
1. Use FTP to create the yum installation Source
Server IP Address: 192.168.200.101
[Root @ localhost ~] # Mount/dev/cdrom/media
[Root @ localhost ~] # Cd/media/Server/
[Root @ localhost Server] # ls | grep vsftpd
Vsftpd-2.0.5-16.el5.i386.rpm
Because the yum repository is not configured yet, you can use rpm to install ftp.
[Root @ localhost Server] # rpm-ivh vsftpd-2.0.5-16.el5.i386.rpm
Warning: vsftpd-2.0.5-16.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: vsftpd ####################################### #### [100%]
We can see that the FTP software has been installed successfully.
After the FTP service is installed, a/var/ftp/pub directory is generated by default.
[Root @ localhost ~] # Cd/var/ftp/pub/
[Root @ localhost pub] # ls
Now there is nothing in this directory. We will copy everything in the CD to this directory.
[Root @ localhost ~] # Cp-p/media/*/var/ftp/pub/
[Root @ localhost ~] # Cd/var/ftp/pub/
[Root @ localhost pub] # ll | grep ^ d
Cluster ClusterStorage Server VT
There are four folders under the/var/ftp/pub directory.
Start the FTP service:
[Root @ localhost ~] # Service vsftpd restart
Shutting down vsftpd: [OK]
Starting vsftpd for vsftpd: [OK]

Configure the yum repository now,
The Yum repository is under the/etc/yum. repod directory (the file name must end with. repo)
[Root @ localhost ~] # Cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # ls
Rhel-debuginfo.repo
There is a rhel-debuginfo.repo template file under the/etc/yum. repos. d directory, you can configure the yum repository according to the content in this file.
[Root @ localhost yum. repos. d] # vi rhel-debuginfo.repo
We can follow the content in this section to add the following content:
[Rhel-Server]
Name = Red Hat Enterprise Linux Server
Baseurl = ftp: // 192.168.200.101/pub/Server
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-Cluster]
Name = Red Hat Enterprise Linux Cluster
Baseurl = ftp: // 192.168.200.101/pub/Cluster
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-ClusterStorage]
Name = Red Hat Enterprise Linux ClusterStorage
Baseurl = fttp: // 192.168.200.101/pub/ClusterStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-VT]
Name = Red Hat Enterprise Linux VT
Baseurl = fttp: // 192.168.200.101/pub/VT
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

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.