이 콘텐츠는 선택한 언어로 제공되지 않습니다.
8.4.2. Setting [repository] Options
				The 
[repository] sections, where repository is a unique repository ID such as my_personal_repo (spaces are not permitted), allow you to define individual Yum repositories. To avoid conflicts, custom repositories should not use names used by Red Hat repositories.
			
				The following is a bare-minimum example of the form a 
[repository] section takes:
			[repository] name=repository_name baseurl=repository_url
[repository]
name=repository_name
baseurl=repository_url
				Every 
[repository] section must contain the following directives:
			- name=repository_name
- where repository_name is a human-readable string describing the repository.
- baseurl=repository_url
- where repository_url is a URL to the directory where therepodatadirectory of a repository is located:- If the repository is available over HTTP, use:http://path/to/repo
- If the repository is available over FTP, use:ftp://path/to/repo
- If the repository is local to the machine, use:file:///path/to/local/repo
- If a specific online repository requires basic HTTP authentication, you can specify your user name and password by prepending it to the URL asusername:password@link. For example, if a repository on http://www.example.com/repo/ requires a user name of “user” and a password of “password”, then thebaseurllink could be specified ashttp://.user:password@www.example.com/repo/
 Usually this URL is an HTTP link, such as:baseurl=http://path/to/repo/releases/$releasever/server/$basearch/os/ baseurl=http://path/to/repo/releases/$releasever/server/$basearch/os/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that Yum always expands the$releasever,$arch, and$basearchvariables in URLs. For more information about Yum variables, see Section 8.4.3, “Using Yum Variables”.
				Another useful 
[repository] directive is the following:
			- enabled=value
- where value is one of:0— Do not include this repository as a package source when performing updates and installs. This is an easy way of quickly turning repositories on and off, which is useful when you desire a single package from a repository that you do not want to enable for updates or installs.1— Include this repository as a package source.Turning repositories on and off can also be performed by passing either the--enablerepo=repo_nameor--disablerepo=repo_nameoption toyum, or through the Add/Remove Software window of the PackageKit utility.
				Many more 
[repository] options exist. For a complete list, see the [repository] OPTIONS section of the yum.conf(5) manual page.
			Example 8.6. A sample /etc/yum.repos.d/redhat.repo file
					The following is a sample 
/etc/yum.repos.d/redhat.repo file: