Where is yum configuration file
To add such a repository to your system and enable it, run the following command as root :. To enable a particular repository or repositories, type the following at a shell prompt as root :. Alternatively, you can use a glob expression to enable all matching repositories:. For example, to enable repositories defined in the [example] , [example-debuginfo] , and [example-source] sections, type:.
First, switch to the client system and login as a user with root or sudo privileges. To do this, move the default yum repository files with the following command:.
In the new file, enter the command replacing the IP address with the IP address of your server :. While still on the client system, run a command to install a package with the yum package manager:. In addition to downloading the default repositories or copying them from the CD , you can also copy any other software packages into your storage folder.
This provides a simple and central location that users can access and install software. Introduction In Linux, a repository is a central database of software.
This tutorial walks you through setting up a local Yum repository on CentOS 7. Was this article helpful? Sofija Simic. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read. SysAdmin Web Servers. Since in our local repository we put all packages from original installation disk, there is no need to enable the GPG check feature. As output confirms that our repository name — rhcerepo and id - rhcerepo is ready to use. Currently this repository contains packages. Now we have a working repository, in remaining part of this tutorial we will learn how to use the repository.
The yum command is used to work with repository. To install, remove or update a package we first need to know the exact name of the package. Since packages name contain a lot of information in name such as version, architecture, platform etc. We can use two sub commands to get the exact name of a package; search and provides.
For example to search any package which contains semanage in the name we can use following command. To search everywhere in package we have to use all option with this command. For example to know which package provides chocon command we can use following command. This command will perform a deep scan in all RPM for file name chocon.
Linux commands have an associated script file which executes when command is called at shell prompt. Once we got the exact package name, we can use info sub command to get the more detailed information about the package. For instance, in above example we figured out that chcon command is provided by coreutils package.
To get more information about this package we can use following command. When we install a package with yum command, it creates necessary directory tree at appropriate location and installs required files from package. It also checks for dependencies.
If any file in package depends on other files, yum will also install those files automatically. During installation if yum finds any file which is already installed in system from package, it will check its current version.
If package contains latest file, it will update the existing file. By default yum command will ask for confirmation. To perform installation without confirmation we have to use —y option.
0コメント