WordPressの管理画面を開いたら
WordPress 3.2 が利用可能です ! 更新してください。
とあった。まだ日本語版が公開されてない様だけど、ちょっと問題。
[blackbirdpie id=”88387791431544833″]
CentOS5.5に付属のPHPを気にせず使っていたけど、純正のレポジトリは今もPHP 5.1.6で止まってる。
だめだこいつ。はやくなんとかしないと。
というわけでググりながらバージョンアップ。実際にはCentOS 5.5 に PHP 5.3 をインストールを参考にさせていただきました。
前準備
バックアップ&デーモン停止
# mysqldump -u root -p –all-databases > dump.sql # /etc/init.d/httpd stop # /etc/init.d/mysqld stop
PHP最新バイナリを公開してくださっているレポジトリリストを登録。
# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm # rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
バージョンアップ
PHPを最新にすると合わせてMySQLのバージョンも最新にしなきゃいけないそうな。先にMySQLの現行Verと導入Verを調べます。
さっき入れたremiを一時レポジトリとして使う為–enablerepo=remiを追加
# yum info mysql --enablerepo=remi
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: www.ftp.ne.jp
* base: www.ftp.ne.jp
* epel: ftp.iij.ad.jp
* extras: www.ftp.ne.jp
* remi: remi-mirror.dedipower.com
* updates: www.ftp.ne.jp
Excluding Packages in global exclude list
Finished
Installed Packages
Name : mysql
Arch : i386
Version : 5.0.77
Release : 4.el5_6.6
Size : 7.9 M
Repo : installed
Summary : MySQL client programs and shared libraries.
URL : http://www.mysql.com
License : GPLv2 with exceptions
Description: MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
: client/server implementation consisting of a server daemon (mysqld)
: and many different client programs and libraries. The base package
: contains the MySQL client programs, the client shared libraries, and
: generic MySQL files.
Available Packages
Name : mysql
Arch : i386
Version : 5.5.13
Release : 1.el5.remi
Size : 7.5 M
Repo : remi
Summary : MySQL client programs and shared libraries
URL : http://www.mysql.com
License : GPLv2 with exceptions
Description: MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
: client/server implementation consisting of a server daemon (mysqld)
: and many different client programs and libraries. The base package
: contains the standard MySQL client programs and generic MySQL files.今は入ってるのは5.0.77、入るのは5.5.13。だーいぶ間が開いてしまった。
同じようにenablerepoをつけてMySQLをアップデート。特に古いバージョンのremoveはしなくても大丈夫みたい
# yum update mysql --enablerepo=remi Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: www.ftp.ne.jp * base: www.ftp.ne.jp * epel: ftp.kddilabs.jp * extras: www.ftp.ne.jp * remi: rpms.famillecollet.com * updates: www.ftp.ne.jp Excluding Packages in global exclude list Finished Setting up Update Process (中略) Updated: mysql.i386 0:5.5.13-1.el5.remi Dependency Updated: mysql-server.i386 0:5.5.13-1.el5.remi php.i386 0:5.3.6-4.el5.remi php-cli.i386 0:5.3.6-4.el5.remi php-common.i386 0:5.3.6-4.el5.remi php-gd.i386 0:5.3.6-4.el5.remi php-ldap.i386 0:5.3.6-4.el5.remi php-mbstring.i386 0:5.3.6-4.el5.remi php-mysql.i386 0:5.3.6-4.el5.remi php-pdo.i386 0:5.3.6-4.el5.remi Complete!
同じようにしてPHPも確認&インストール
# yum info php --enablerepo=remi
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: www.ftp.ne.jp
* base: www.ftp.ne.jp
* epel: ftp.kddilabs.jp
* extras: www.ftp.ne.jp
* remi: rpms.famillecollet.com
* updates: www.ftp.ne.jp
(中略)
Excluding Packages in global exclude list
Finished
Installed Packages
Name : php
Arch : i386
Version : 5.1.6
Release : 27.el5_5.3
Size : 5.9 M
Repo : installed
Summary : The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
URL : http://www.php.net/
License : The PHP License v3.01
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated webpages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
Available Packages
Name : php
Arch : i386
Version : 5.3.6
Release : 4.el5.remi
Size : 1.3 M
Repo : remi
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module which adds support for the PHP
: language to Apache HTTP Server.
# yum update php --enablerepo=remi
省略これでPHPは5.1.6から5.3.6へ。
え?
これで終わり、と思って/etc/init.d/mysqld startしたら[FAILED]と出て動かない。
エラーを調べるため/var/log/mysqld.logを見てみる。
110706 15:22:47 [ERROR] /usr/libexec/mysqld: unknown variable ‘default-character-set=utf8’
これが何かと調べてみたら答え発見
[ERROR] /usr/libexec/mysqld: unknown variable ‘default-character-set=utf8′
原因は/etc/my.cnfの「mysqld」で「default-character-set」の記述。
5.5からは「default-character-set」は使えない。かわりに
character-set-server=utf8
を使おう。
/etc/my.cnfを修正して無事復旧。むしろこの修正だけで動いて暮れて良かった。[mysql]や[client]はdefault-character-set=utf8のままでOK。
あとはWordPress 3.2jaが出るのを待つのみ。


