Deploy YUM repository in CentOS 6.5
CentOS 6.5
In Linux, if you install the rpm package, you may always need to solve the corresponding dependencies. Using the YUM repository, you can easily install, uninstall, and automatically upgrade the rpm package, it can automatically find and solve the dependency before the rpm package.
The YUM repository has three deployment methods: FTP, HTTP, and local.
I. FTP
1. First mount the system CD, install the ftp service on the YUM repository server, and start
Note: Add the following two rules:
2. Configure the YUM repository server (my IP Address: 192.168.100.100)
First, create a YUM repository directory under the ftp directory, and copy the rpm packages that need to be made into the YUM repository to the directory
Then, manually create a repodata data file in the directory. Before creating a repodata data file, we need to install the tool for creating the repodata data file. The tool used is createrepo. Note that this package is dependent.
After the createrepo tool is installed, we can create a repodata data file in the YUM repository directory.
3. Configure the YUM repository Client
For the first configuration, You need to delete the content in the/etc/yum. repos. d/directory and create a file ending with ". repo". The file content is as follows:
4. Install the rpm Software Package for testing
In this way, a YUM repository accessed via FTP is created.
Ii. Local Mode
For example, if you want to create a YUM repository by attaching a CentOS CD to/media, you can perform this operation. add a new repository source to the repo file. The configuration is as follows:
You can run the "yum repolist" command to query the currently available yum source, that is, the YUM repository.
We can see that we can use two YUM repositories. As for how to use other commands of the YUM repository, here are a few simple examples.
For more YUM tutorials, see the following:
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning
Build yum local source on CentOS 6.4
This article permanently updates the link address: