====== Linux:yum:yumについて ====== ===== 環境 ===== * OS:CentOS 6.6 * yum 3.2.29 ===== yumとは ===== * RedHat系ディストリビューションで採用されているパッケージ管理システム ===== 設定ファイル ===== - yum全体に関連する設定は、 /etc/yum.conf に記述 - 個々のリポジトリの設定は、/etc/yum.repos.d/∗.rep に記述 ===== yum.conf ファイル ===== ==== 例 === [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=5 bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum distroverpkg=centos-release # This is the default, if you make this bigger yum won't see if the metadata # is newer on the remote and so you'll "gain" the bandwidth of not having to # download the new metadata and "pay" for it by yum not having correct # information. # It is esp. important, to have correct metadata, for distributions like # Fedora which don't keep old packages around. If you don't like this checking # interupting your command line usage, it's much better to have something # manually check the metadata once an hour (yum-updatesd will do this). # metadata_expire=90m # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d ==== [main] セクションに指定できるディレクティブ ==== ^ ディレクティブ ^ 説明 ^ |cachedir|ダウンロードしたパッケージを格納するためのディレクトリを指定する。| |persistdir| | |keepcache|0:インストール成功後ヘッダーとパッケージのキャッシュを保持しない(デフォルト)| |::: |1:インストール成功後キャッシュを保持する| |reposdir| | |options| | |debuglevel| | |errorlevel| | |rpmverbosity| | |protected_packages| | |protected_multilib| | |logfile| | |gpgcheck| | |localpkg_gpgcheck| | |repo_gpgcheck| | |skip_broken| | |assumeyes|0:yumは実行する重要な動作の確認をプロンプトする。(デフォルト)| |::: |1:yumが実行する重要な動作の確認をプロンプトしない。| |alwaysprompt| | |tolerant| | |exclude| | |exactarch| | |installonlypkgs| | |installonly_limit| | |kernelpkgnames| | |showdupesfromrepos| | |obsoletes| | |overwrite_groups| | |groupremove_leaf_only| | |enable_group_conditionals| | |group_package_types| | |installroot| | |distroverpkg| | |diskspacecheck| | |tsflags| | |recent| | |retries| | |keepalive| | |timeout| | |http_caching| | |throttle| | |bandwidth| | |sslcacert| | |sslverify| | |sslclientcert| | |sslclientkey| | |ssl_check_cert_permissions| | |history_record| | |history_record_packages| | |history_list_view| | |commands| | |syslog_ident| | |syslog_facility| | |syslog_device| | |proxy| | |proxy_username| | |proxy_password| | |username| | |password| | |plugins| | |pluginpath| | |pluginconfpath| | |metadata_expire| | |mirrorlist_expire| | |mdpolicy| | |multilib_policy| | |bugtracker_url| | |color| | |color_list_installed_older| | |color_list_installed_newer| | |color_list_installed_reinstall| | |color_list_installed_extra| | |color_list_available_upgrade| | |color_list_available_downgrade| | |color_list_available_install| | |color_list_available_reinstall| | |color_search_match| | |color_update_installed| | |color_update_local| | |color_update_remote| | |clean_requirements_on_remove| | |reset_nice| | |depsolve_loop_limit| | ===== /etc/yum.repos/∗.rep ファイル ===== ==== CentOS-Base.repの例 === # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =os&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =updates&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =extras&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =centosplus&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =contrib&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful ==== [repository] セクションに指定できるディレクティブ ==== * //**repository**// は一意なリポジトリIDを指定し、個々のyumリポジトリを定義する。 ^ ディレクティブ ^ 説明 ^ |name|リポジトリの説明。省略不可| |baseurl| | |mirrorlist| | |enabled| | |gpgkey| |