久しぶりにサーバ構築することとなり、CentOS5.8にMySQL5.5をインストールしようとする。
以前の記事から、既に1年以上が経って、もはやその通りに動作していないことに気付く。
再度覚え書きとする。
■yum レポジトリの追加
[bash]
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
警告: epel-release-5-4.noarch.rpm: ヘッダ V4 DSA signature: NOKEY, key ID 9cd4953f
準備中… ########################################### [100%]
1:epel-release ########################################### [100%]
rpm -Uvh ius-release-1.0-10.ius.el5.noarch.rpm
警告: ius-release-1.0-10.ius.el5.noarch.rpm: ヘッダ V4 DSA signature: NOKEY, key ID 9cd4953f
準備中… ########################################### [100%]
1:ius-release ########################################### [100%]
[/bash]
■ius,epelからのインストール。
[bash]
yum –enablerepo=ius,epel install mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.oss.eznetsols.org
* epel: ftp.iij.ad.jp
* extras: ftp.oss.eznetsols.org
* ius: archive.linux.duke.edu
* updates: ftp.oss.eznetsols.org
epel | 3.7 kB 00:00
epel/primary_db | 3.8 MB 00:00
ius | 2.2 kB 00:00
ius/primary_db | 166 kB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql.i386 0:5.0.95-1.el5_7.1 set to be updated
—> Package mysql.x86_64 0:5.0.95-1.el5_7.1 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Installing:
mysql i386 5.0.95-1.el5_7.1 updates 4.9 M
mysql x86_64 5.0.95-1.el5_7.1 updates 4.9 M
Transaction Summary
=====================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 9.8 M
[/bash]
残念ながら、5.0のままなので、No!!
[bash]
Is this ok [y/N]: N
Exiting on user Command
Complete!
[/bash]
■再度バージョン指定して実行。
[bash]
yum –enablerepo=ius,epel install mysql55
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.oss.eznetsols.org
* epel: ftp.iij.ad.jp
* extras: ftp.oss.eznetsols.org
* ius: archive.linux.duke.edu
* updates: ftp.oss.eznetsols.org
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql55.x86_64 0:5.5.28-2.ius.el5 set to be updated
–> Processing Dependency: mysql55-libs = 5.5.28-2.ius.el5 for package: mysql55
–> Processing Dependency: mysqlclient15 for package: mysql55
–> Running transaction check
—> Package mysql55-libs.x86_64 0:5.5.28-2.ius.el5 set to be updated
—> Package mysqlclient15.x86_64 0:5.0.92-3.ius.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Installing:
mysql55 x86_64 5.5.28-2.ius.el5 ius 11 M
Installing for dependencies:
mysql55-libs x86_64 5.5.28-2.ius.el5 ius 1.1 M
mysqlclient15 x86_64 5.0.92-3.ius.el5 ius 1.7 M
Transaction Summary
=====================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): mysql55-libs-5.5.28-2.ius.el5.x86_64.rpm | 1.1 MB 00:01
(2/3): mysqlclient15-5.0.92-3.ius.el5.x86_64.rpm | 1.7 MB 00:00
(3/3): mysql55-5.5.28-2.ius.el5.x86_64.rpm | 11 MB 00:02
—————————————————————————————————–
Total 2.4 MB/s | 14 MB 00:05
警告: rpmts_HdrFromFdno: ヘッダ V4 DSA signature: NOKEY, key ID 9cd4953f
ius/gpgkey | 1.3 kB 00:00
Importing GPG key 0x9CD4953F "IUS Community Project <coredev@iuscommunity.org>" from /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysqlclient15 1/3
Installing : mysql55-libs 2/3
Installing : mysql55 3/3
Installed:
mysql55.x86_64 0:5.5.28-2.ius.el5
Dependency Installed:
mysql55-libs.x86_64 0:5.5.28-2.ius.el5 mysqlclient15.x86_64 0:5.0.92-3.ius.el5
Complete!
[/bash]
mysql-server55 が足りなかったようだ。
[bash]
yum –enablerepo=ius,epel install mysql55-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.oss.eznetsols.org
* epel: ftp.iij.ad.jp
* extras: ftp.oss.eznetsols.org
* ius: archive.linux.duke.edu
* updates: ftp.oss.eznetsols.org
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql55-server.x86_64 0:5.5.28-2.ius.el5 set to be updated
–> Processing Dependency: perl-DBD-MySQL for package: mysql55-server
–> Running transaction check
—> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Installing:
mysql55-server x86_64 5.5.28-2.ius.el5 ius 12 M
Installing for dependencies:
perl-DBD-MySQL x86_64 3.0007-2.el5 base 148 k
Transaction Summary
=====================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm | 148 kB 00:00
(2/2): mysql55-server-5.5.28-2.ius.el5.x86_64.rpm | 12 MB 00:03
—————————————————————————————————–
Total 2.9 MB/s | 12 MB 00:04
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-DBD-MySQL 1/2
Installing : mysql55-server 2/2
Installed:
mysql55-server.x86_64 0:5.5.28-2.ius.el5
Dependency Installed:
perl-DBD-MySQL.x86_64 0:3.0007-2.el5
Complete!
[/bash]
上手くいったようだ。結果として /usr/bin/以下にインストールされているようだ。
■MySQL Serverの起動
[bash]
# /etc/rc.d/init.d/mysqld start
MySQL データベースを初期化中: Installing MySQL system tables…
OK
Filling help tables…
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h 127.0.0.1 password ‘new-password’
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
mysqld を起動中: [ OK ]
[/bash]
■MySQL Serverの自動起動設定
[bash]
chkconfig mysqld on
chkconfig –list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[/bash]
Pingback: Whoocus » Blog Archive » CentOS6.7へのMySQL5.6のインストール方法