Home > タグ > リポジトリ

リポジトリ

CentOS 6 セキュリティ更新とバグフィクス用リポジトリを公開

CentOS 6用のContinuous Releaseリポジトリが公開されていた。
次期バージョン(CentOS 6.1)がリリースされるまでの繋ぎとしての役割みたいなものみたいだが、セキュリティ更新とバグフィクスが多く含まれているのでリポジトリを追加し更新した。

リポジトリの追加

[root@centos ~]# yum install centos-release-cr

もしくは下記のどちらかをインストール

i386:
http://mirror.centos.org/centos/6/extras/i386/RPMS/centos-release-cr-6-0.el6.centos.i686.rpm
( sha256: 9fc78d2d79abeb1513f0851d075a2860f5039fc8db3fb0db4c660252fffda894 )

x86_64:
http://mirror.centos.org/centos/6/extras/x86_64/RPMS/centos-release-cr-6-0.el6.centos.x86_64.rpm
( sha256: bd55e1505caae2f78c306290d235b7f54833fcad5a9f1942b3cb54e28f7bfe73 )

インストール後にアップデートを実行すると200近いパッケージ(150M超)の更新があった。

参考 » [CentOS-announce] CentOS-6.0 Continuous Release i386 and x86_64

MySQL5.5.16にアップデート

MySQLの5.5.16がRemiレポジトリよりリリースされていたのでアップデート。

(1/12): mysql-5.5.16-1.el6.remi.x86_64.rpm                         | 5.7 MB
(2/12): mysql-devel-5.5.16-1.el6.remi.x86_64.rpm                   | 152 kB
(3/12): mysql-libs-5.5.16-1.el6.remi.x86_64.rpm                    | 757 kB
(4/12): mysql-server-5.5.16-1.el6.remi.x86_64.rpm                  |  10 MB
(5/12): php-5.3.8-4.el6.remi.x86_64.rpm                            | 2.3 MB
(6/12): php-cli-5.3.8-4.el6.remi.x86_64.rpm                        | 2.2 MB
(7/12): php-common-5.3.8-4.el6.remi.x86_64.rpm                     | 844 kB
(8/12): php-gd-5.3.8-4.el6.remi.x86_64.rpm                         | 131 kB
(9/12): php-mbstring-5.3.8-4.el6.remi.x86_64.rpm                   | 894 kB
(10/12): php-mcrypt-5.3.8-4.el6.remi.x86_64.rpm                    |  39 kB
(11/12): php-mysql-5.3.8-4.el6.remi.x86_64.rpm                     |  80 kB
(12/12): php-pdo-5.3.8-4.el6.remi.x86_64.rpm                       | 106 kB

PHP関連も修正が入っていたみたいなので併せて実行

DB自体をアップグレード

[root@centos ~]# mysql_upgrade -u root -p

MySQLの再起動

[root@centos ~]# /etc/rc.d/init.d/mysqld restart
mysqld を停止中:                                           [  OK  ]
mysqld を起動中:                                           [  OK  ]

バージョン確認

[root@centos ~]# rpm -q mysql
mysql-5.5.16-1.el6.remi.x86_64

MySQL5.5.16更新内容 »» D.1.1. Changes in MySQL 5.5.16 (15 September 2011)

PHP5.2.10にアップデート

PHPを5.2.9から5.2.10にアップデート。

»» php.announce: PHP 5.2.10 Released!
»» PHP 5 ChangeLog PHP 5 ChangeLog

セキュリティ関連バグを含む100以上のバグフィックスが行われていて、安定性が向上してるとの事でアップデート推奨になっている。

PHP5.2.10

PHP5.2.9にアップデート

先日追加したリポジトリLes RPM de RemiにPHP5.2.9がアップされていたので早速アップデートしてみた。
アップデート自体はエラーなく行えたもののhttpdの再起動で失敗。少し考え前回PHP5.2.8のアップデート時と同様の失敗を犯していたことに気付く。

PHPを高速化すべく導入していたeAcceleratorを再ビルドしていなかった為に再起動時にエラーが発生しhttpdが起動しなかったというもの。

[root@server ~]# wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
[root@server ~]# tar xvjf eaccelerator-0.9.5.3.tar.bz2
[root@server ~]# cd eaccelerator-0.9.5.3
[root@server eaccelerator-0.9.5.3]# phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
[root@server eaccelerator-0.9.5.3]# ./configure
[root@server eaccelerator-0.9.5.3]# make
[root@server eaccelerator-0.9.5.3]# make install

php.iniファイルへの記述やeAcceleratorのコントロールパネルへのアクセス等は変更する必要がないので、再コンパイル後そのまま再起動でOK。
再コンパイルって上記のように再インストールしているが、この方法で間違っていないのかそれとも他の方法があるのか少々不安なものの問題なく動作しているので良しとする。

PHP 5 ChangeLog PHP 5 ChangeLog

因みにphp.iniファイルへの記述は下記のとおり
続きを読む

リポジトリを追加 -EPEL-

CentOS5.2でPHPを5.2.8にしたので他のファイルもある程度新しくしてしまえ!との考えでリポジトリEPEL(Extra Packages for Enterprise Linux )を追加した。

前回の個人が管理するリポジトリとは違いFedora内部発ということで安心して(?)使用できると思う。
そうまでして最新版を使いたいのなら鯖構築時に何故CentOSを選択したのかという疑問は残ってしまうが。

yum用設定ファイルをインポート

[root@server ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

リポジトリファイルを編集

[root@server ~]# vi /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 – $basearch – Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 5 – $basearch – Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

デフォルトではEPELが常時有効設定 enabled=1になっているので必要時だけ接続したい場合はenabled=0に変更。
実際に使用する際は下記コマンドでOK

[root@server ~]# yum –enablerepo=epel update

EPELに関しては問題ないと判断してenabled=1 のままで運用しているが現状問題なし。

リポジトリを追加 -Les RPM de Remi-

CentOS5.2でPHPをインストールするとPHP5.1.6がインストールされるが5.2.xxを使用したかったのでサードパーティのリポジトリを追加した。

今回追加したのはフランスのLes RPM de Remiというところのもの。追加することによりPHPやMySQLの最新版が使用することができる。
ただ公式にサポートされたリポジトリではないので当然リスクは大きくなるが、故人鯖ゆえ第三者に迷惑がかからなければOKというスタンスで導入した。

GPGキーをインポート

[root@server ~]# rpm –import http://rpms.famillecollet.com/RPM-GPG-KEY-remi

リポジトリファイルを追加

[root@server ~]# cd /etc/yum.repos.d
[root@server ~]# wget http://rpms.famillecollet.com/remi-enterprise.repo

リポジトリファイルを編集

[root@server ~]# vi /etc/yum.repos.d/remi-enterprise.repo

[remi]
name=Les RPM de remi pour Enterpise Linux $releasever – $basearch
baseurl=http://rpms.famillecollet.com/el$releasever.$basearch/
http://iut-info.univ-reims.fr/remirpms/el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
failovermethod=priority

[remi-test]
name=Les RPM de remi en test pour Enterpise Linux $releasever – $basearch
baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi

常時有効にしておくのは気持ち悪いので[remi]のenabled=1をenabled=0に変更。
[remi-test]はアルファ版等のテスト用なので使用しない方がベターというか項目自体削除しておいた方がいいと思う。

で実際に使用する際は下記コマンドでOK

[root@server ~]# yum –enablerepo=remi update php

ただ依存関係で躓く事も多いので実際には下記のコマンドで対応している。

[root@server ~]# yum –enablerepo=remi update

Home > タグ > リポジトリ

Tag Cloud
メタ情報

ページの上部に戻る