Custom yum repository and configuration file in CentOS

Source: Internet
Author: User

Yum uses the repository to save the software packages for managing rpm, And the repository configuration files are saved in the/etc/yum. repos. d/directory in the following format:

[LinuxCast] # repository name = explanation of repository name # describe basic Repository Information baseurl = repository address # local or http, ftp, file, ntfsenable = 1 # whether enable gpgcheck = 1 # verify

The yum configuration file must start. at the end of the repo, a configuration file can save the configuration information of multiple yum repositories,/etc/yum. repos. d/The Directory can contain multiple configuration files.


Commands for operating software using yum:

Yum install software-name # install the specified software yum remove software-name # uninstall the specified software yum update software-name # update the specified software

Query using yum:

Yum search keyword # search yum list (all | installed | recent | updates) # list all, installed, recent, software updates yum info packagename # display the specified software information yum whatprovides packagename # query which rpm contains the Software Package

Create a yum repository by yourself:
1. Install the createrepo file through rpm
2. Run the following command: createrepo-v/yum-dir # create the index file of the yum repository.
3. Create a configuration file for the yum Repository
4. yum clean all # Clear yum Cache Information
5. Use yum to group the software package: createrepo-g/tmp/comps. xml/yum-dir

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.