CentOS6
URL
OSSインストール時に変更すべき、7つのセキュリティ設定項目 (1) まずはバージョンチェック | マイナビニュース
http://news.mynavi.jp/articles/2014/07/23/osssecurity/
古いマイナーバージョンのCentOSを使い続ける。
単純に yum update すると、マイナーバージョンが勝手に上がってしまう。
つまり、6.2をインストールしていても yum update すると 6.xx(最新リビジョン)になる。
マイナーバージョンを保持したい場合どうすればいいんだろう?
リポジトリを固定することで、マイナーバージョンを固定化する方法
CentOS6 のバージョンを固定するシェルスクリプト | CUBE SUGAR STORAGE
http://momijiame.tumblr.com/post/28059040511/centos6
yum updateできなくなった古いCentOSでyumコマンドを復活させる方法 - Dマイナー志向
http://d.hatena.ne.jp/tmatsuu/20120324/1332578375
/etc/yum.repos.d/CentOS-Base.rpeo を編集して、
http://mirror.centos.org/ の参照先を
固定で6.2を指定するようにすればよいそうだ。
ところが、公式リポジトリ(http://mirror.centos.org/)は、2つ前のマイナーバージョンまでしか置いていないようだ。
さらに、古いマイナーバージョンのものは http://vault.centos.org/ を指定すればよい。
ということのようだが、最新のセキュリティパッチは適用されないので注意が必要。
セキュリティパッチのみ適用することで、できる限りマイナーバージョンを保持する方法
Linuxねた帳: yumでセキュリティパッチだけを適用する
http://knowledge4linux.blogspot.jp/2012/08/yum.html
Yum Command Check and Apply Only Security Updates
http://www.cyberciti.biz/faq/rhel-centos-yum-check-update-security-plugin/
yum の yum-plugin-security プラグインをインストールすると、以下の
コマンドでセキュリティアップデートのみ適用できるそうだ。
yum --security check-update
yum
パッケージ一覧
$ yum list
インストール済みのみ
$ yum list installed 又は $ rpm -qa
アップデート必要なもののみ
$ yum check-update 又は $ yum list updates
古いパッケージのみ(リポジトリに存在しないものや、アップデートされていないもの。だと思われる)
$ yum list extras
セキュリティアップデートのみ表示
yum list-security yum --security check-update
ファイルを探す
$ yum provides "*/my.cnf" ・・・未インストールも含む 又は $ rpm -q --whatprovides /etc/my.cnf
パッケージの情報
$ rpm -qi <パッケージ名>
パッケージに含まれるファイル一覧
$ rpm -qs <パッケージ名>
登録済みレポジトリ一覧
$ yum repolist all
履歴
InstallやUpdateなどの操作は、履歴として保持されており、
これを検索できる。
履歴一覧
$ yum history list
履歴詳細
$ yum history info <ID>
履歴をパッケージ名で検索
$yum history packages-list <パッケージ名>
yum操作のUNDO
$ yum history undo <ID>
RPMforge, Remi, EPEL をリポジトリに登録する。
yum が便利になる RPMforge、Remi、EPEL とは一体何なのか | oki2a24
http://oki2a24.com/2012/03/13/what-is-rpmforge-remi-epel/
リポジトリ名が @anaconda-CentOS-201112091719.x86_64/6.2 となっているのは何?
なに?
このリポジトリ名?
# yum list installed | grep openssl openssl.x86_64 1.0.0-20.el6 @anaconda-CentOS-201112091719.x86_64/6.2
CentOSのバージョンは 6.2 x86_64
# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.2 (Final) Release: 6.2 Codename: Final # cat /etc/centos-release CentOS release 6.2 (Final) # cat /etc/redhat-release CentOS release 6.2 (Final) # arch x86_64
最新は 1.0.1e-16.el6_5
# yum check-update | grep openssl openssl.x86_64 1.0.1e-16.el6_5 updates
つまり
インストール済 1.0.0-20.el6 @anaconda-CentOS-201112091719.x86_64/6.2
インストール未 1.0.1e-16.el6_5 updates
ということらしい。
登録済みリポジトリから openssl を検索
# yum provides openssl Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp openssl-1.0.1e-15.el6.x86_64 : A general purpose cryptography library with TLS implementation Repo : base★ Matched from: openssl-1.0.1e-16.el6_5.i686 : A general purpose cryptography library with TLS implementation Repo : updates Matched from: openssl-1.0.1e-16.el6_5.x86_64 : A general purpose cryptography library with TLS implementation Repo : updates★ Matched from: openssl-1.0.1e-15.el6.i686 : A general purpose cryptography library with TLS implementation Repo : base Matched from: openssl-1.0.0-20.el6.x86_64 : A general purpose cryptography library with TLS implementation Repo : installed★ Matched from: Other : Provides-match: openssl
つまり、
1.インストール済 1.0.0-20.el6 @anaconda-CentOS-201112091719.x86_64/6.2
2.インストール未 1.0.1e-15.el6 base
3.インストール未 1.0.1e-16.el6_5 updates
ということか。
たぶん、
1.CentOS6.2のDVDからインストール
2,3.yumリポジトリは公式を参照してるからbase,updatesが未インストールで見えている
という状況か。
パッケージのchangelogを表示
rpm -q --changelog <パッケージ名>
Software Collections for CentOS 6
- CentOS6への追加パッケージ集
- EPELなどのサードパーティーリポジトリではなく、RedHat公式なのでより安心
Software Collections for CentOS 6を使おう! | IDC Frontier Engineers' Blog
http://www.idcf.jp/blog/cloud/software-collections-for-centos-6/
最終更新時間:2014年08月17日 21時34分24秒