Linux YUM is built on an ftp server as the source

Source: Internet
Author: User

Linux YUM is a commonly used software for computer gamers. Then I will study and study Linux YUM in depth. Here I will discuss with you how to use Linux YUM, hoping to help you. Use the ftp server as the source.

I. Preparations

1. Start REDHAT Linux and put it on the installation CD.

2. mount the optical drive mount/dev/cdrom/mnt

3. Install the FTP service
Cd/mnt/Server
Rpm-ivh vsftpd *
Chkconfig vsftpd on
Service vsftpd start

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

5. copy the files from the system disk to the system.
Cp-R/mnt/Server/var/ftp/pub

2. Build Linux YUM

1. createrepo-g/var/ftp/pub/Server/repodata/comps-rhel5-server-core. pay attention to xml/var/ftp/pub/Server. comps-rhel5-server-core. xml must not be generated manually. the default installation CD already exists

2. After completing the preceding steps, an error message is displayed. "cocould not remove old metadata dir:. olddata" indicates that the directory is faulty. Delete the directory from rm-rf/var/ftp/pub/Server/. olddata.

3. Perform Step 1 again createrepo-g/var/ftp/pub/Server/repodata/comps-rhel5-server-core. xml/var/ftp/pub/Server/

4. Create a repository file and create a repository file. The file name can be set to. cd/etc/yum. repos. d vim yum. repo. Write the following content in the file:

 
 
  1. [Base]
  2. Name=Base 
  3. #192. 168. 0. 6 is your YUM Source Address
  4. Baseurl=Ftp: // 192. 168. 0. 6/pub/Server
  5. # Enable source?
  6. Enabled=1 
  7. # Verify or not.
  8. Gpgcheck=1 
  9. # Verification key. Optional
  10. Gpgkey=File: // Etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

After the above steps, the Linux YUM source is set up. Of course. you can provide your source to others. you only need to copy your repo file to/etc/yum. repos. d/bottom. or you can manually copy it. If you want to create another warehouse, such as VT, Cluster, and ClusterStorage, repeat the preceding steps and modify the warehouse file. With Linux YUM, it is much easier to install software packages later. You do not need to consider dependency relationships.

Linux YUM usage

 
 
  1. Yum install software name/** // * download and install the corresponding software package */
  2. Yum info software name/** // * view the software package details */
  3. Yum list | grep kernel/** // * Find the kernel package */
  4. Yum update firefox/** // * update firefox */
  5. Yum remove bmp-mp3/*** // remove bmp-mp3 */
  6. Man yum/** // * view the yum command details */
  7. The configuration path of the yum file is/etc/yum. conf.

#0 indicates that the downloaded file is not saved; 1 indicates that the downloaded file is saved; keepcache = 0 by default # specifies the path to save the downloaded file, the file is saved in the/packages/directory cachedir =/var/cache/yum.

  1. Update list of Linux yum installation package
  2. Linux yum powerful basic operations
  3. Configure Linux YUM source settings to use a proxy
  4. Linux YUM configuration highlights
  5. Linux Yum installation configuration and installation command Application

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.