手順を残しておく。
最初の作業。
# yum install centos-release-SCL
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package centos-release-SCL.x86_64 10:6-5.el6.centos will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
centos-release-SCL x86_64 10:6-5.el6.centos extras 3.9 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 3.9 k
Installed size: 453
Is this ok [y/N]: y
Downloading Packages:
centos-release-SCL-6-5.el6.centos.x86_64.rpm | 3.9 kB 00:00
警告: rpmts_HdrFromFdno: ヘッダ V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key)
Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 10:centos-release-SCL-6-5.el6.centos.x86_64 1/1
Verifying : 10:centos-release-SCL-6-5.el6.centos.x86_64 1/1
Installed:
centos-release-SCL.x86_64 10:6-5.el6.centos
Complete!
次の作業。
# rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm を取得中
警告: /var/tmp/rpm-tmp.2F4WFq: ヘッダ V4 DSA/SHA1 Signature, key ID 45499429: NOKEY
準備中... ########################################### [100%]
1:groonga-release ########################################### [100%]
[root@centos6 ruby_on_rails]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
base | 3.7 kB 00:00
base/filelists_db | 5.9 MB 00:06
base/other_db | 2.8 MB 00:02
extras | 3.4 kB 00:00
extras/filelists_db | 11 kB 00:00
extras/prestodelta | 907 B 00:00
extras/other_db | 5.8 kB 00:00
groonga | 2.5 kB 00:00
groonga/filelists_db | 172 kB 00:00
groonga/primary_db | 139 kB 00:00
groonga/other_db | 160 kB 00:00
scl | 2.9 kB 00:00
scl/filelists_db | 1.2 MB 00:02
scl/other_db | 711 kB 00:01
updates | 3.4 kB 00:00
updates/filelists_db | 2.3 MB 00:02
updates/prestodelta | 365 kB 00:00
Metadata Cache Created
では、MySQL5をインストールする。
# yum install -y mysql55-mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql55-mysql-server.x86_64 0:5.5.37-1.2.el6.centos.alt will be installed
--> Processing Dependency: mysql55-mysql-libs(x86-64) = 5.5.37-1.2.el6.centos.alt for package: mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64
--> Processing Dependency: mysql55-mysql(x86-64) = 5.5.37-1.2.el6.centos.alt for package: mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64
--> Processing Dependency: mysql55-runtime for package: mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64
--> Running transaction check
---> Package mysql55-mysql.x86_64 0:5.5.37-1.2.el6.centos.alt will be installed
---> Package mysql55-mysql-libs.x86_64 0:5.5.37-1.2.el6.centos.alt will be installed
---> Package mysql55-runtime.x86_64 0:1-14.el6.centos.alt will be installed
--> Processing Dependency: policycoreutils-python for package: mysql55-runtime-1-14.el6.centos.alt.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.0.83-19.39.el6 will be installed
--> Processing Dependency: libsemanage-python >= 2.0.43-4 for package: policycoreutils-python-2.0.83-19.39.el6.x86_64
--> Processing Dependency: audit-libs-python >= 1.4.2-1 for package: policycoreutils-python-2.0.83-19.39.el6.x86_64
--> Processing Dependency: setools-libs-python for package: policycoreutils-python-2.0.83-19.39.el6.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.2-4.el6_5 will be installed
--> Processing Dependency: audit-libs = 2.2-4.el6_5 for package: audit-libs-python-2.2-4.el6_5.x86_64
---> Package libsemanage-python.x86_64 0:2.0.43-4.2.el6 will be installed
---> Package setools-libs-python.x86_64 0:3.3.7-4.el6 will be installed
--> Processing Dependency: setools-libs = 3.3.7-4.el6 for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Running transaction check
---> Package audit-libs.x86_64 0:2.2-2.el6 will be updated
--> Processing Dependency: audit-libs = 2.2-2.el6 for package: audit-2.2-2.el6.x86_64
---> Package audit-libs.x86_64 0:2.2-4.el6_5 will be an update
---> Package setools-libs.x86_64 0:3.3.7-4.el6 will be installed
--> Running transaction check
---> Package audit.x86_64 0:2.2-2.el6 will be updated
---> Package audit.x86_64 0:2.2-4.el6_5 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
mysql55-mysql-server x86_64 5.5.37-1.2.el6.centos.alt scl 10 M
Installing for dependencies:
audit-libs-python x86_64 2.2-4.el6_5 updates 59 k
libsemanage-python x86_64 2.0.43-4.2.el6 base 81 k
mysql55-mysql x86_64 5.5.37-1.2.el6.centos.alt scl 5.7 M
mysql55-mysql-libs x86_64 5.5.37-1.2.el6.centos.alt scl 217 k
mysql55-runtime x86_64 1-14.el6.centos.alt scl 1.0 M
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
policycoreutils-python x86_64 2.0.83-19.39.el6 base 343 k
setools-libs x86_64 3.3.7-4.el6 base 400 k
setools-libs-python x86_64 3.3.7-4.el6 base 222 k
Updating for dependencies:
audit x86_64 2.2-4.el6_5 updates 225 k
audit-libs x86_64 2.2-4.el6_5 updates 60 k
Transaction Summary
================================================================================
Install 10 Package(s)
Upgrade 2 Package(s)
Total download size: 19 M
Downloading Packages:
(1/12): audit-2.2-4.el6_5.x86_64.rpm | 225 kB 00:00
(2/12): audit-libs-2.2-4.el6_5.x86_64.rpm | 60 kB 00:00
(3/12): audit-libs-python-2.2-4.el6_5.x86_64.rpm | 59 kB 00:00
(4/12): libsemanage-python-2.0.43-4.2.el6.x86_64.rpm | 81 kB 00:00
(5/12): mysql55-mysql-5.5.37-1.2.el6.centos.alt.x86_64.r | 5.7 MB 00:13
(6/12): mysql55-mysql-libs-5.5.37-1.2.el6.centos.alt.x86 | 217 kB 00:01
(7/12): mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x | 10 MB 00:17
(8/12): mysql55-runtime-1-14.el6.centos.alt.x86_64.rpm | 1.0 MB 00:01
(9/12): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00
(10/12): policycoreutils-python-2.0.83-19.39.el6.x86_64. | 343 kB 00:00
(11/12): setools-libs-3.3.7-4.el6.x86_64.rpm | 400 kB 00:00
(12/12): setools-libs-python-3.3.7-4.el6.x86_64.rpm | 222 kB 00:00
--------------------------------------------------------------------------------
Total 448 kB/s | 19 MB 00:42
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating : audit-libs-2.2-4.el6_5.x86_64 1/14
Installing : audit-libs-python-2.2-4.el6_5.x86_64 2/14
Installing : setools-libs-3.3.7-4.el6.x86_64 3/14
Installing : setools-libs-python-3.3.7-4.el6.x86_64 4/14
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 5/14
Installing : libsemanage-python-2.0.43-4.2.el6.x86_64 6/14
Installing : policycoreutils-python-2.0.83-19.39.el6.x86_64 7/14
Installing : mysql55-runtime-1-14.el6.centos.alt.x86_64 8/14
Installing : mysql55-mysql-libs-5.5.37-1.2.el6.centos.alt.x86_64 9/14
Installing : mysql55-mysql-5.5.37-1.2.el6.centos.alt.x86_64 10/14
Installing : mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64 11/14
Updating : audit-2.2-4.el6_5.x86_64 12/14
Cleanup : audit-2.2-2.el6.x86_64 13/14
Cleanup : audit-libs-2.2-2.el6.x86_64 14/14
Verifying : libsemanage-python-2.0.43-4.2.el6.x86_64 1/14
Verifying : mysql55-runtime-1-14.el6.centos.alt.x86_64 2/14
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 3/14
Verifying : audit-libs-python-2.2-4.el6_5.x86_64 4/14
Verifying : setools-libs-python-3.3.7-4.el6.x86_64 5/14
Verifying : mysql55-mysql-5.5.37-1.2.el6.centos.alt.x86_64 6/14
Verifying : audit-libs-2.2-4.el6_5.x86_64 7/14
Verifying : policycoreutils-python-2.0.83-19.39.el6.x86_64 8/14
Verifying : mysql55-mysql-server-5.5.37-1.2.el6.centos.alt.x86_64 9/14
Verifying : audit-2.2-4.el6_5.x86_64 10/14
Verifying : setools-libs-3.3.7-4.el6.x86_64 11/14
Verifying : mysql55-mysql-libs-5.5.37-1.2.el6.centos.alt.x86_64 12/14
Verifying : audit-libs-2.2-2.el6.x86_64 13/14
Verifying : audit-2.2-2.el6.x86_64 14/14
Installed:
mysql55-mysql-server.x86_64 0:5.5.37-1.2.el6.centos.alt
Dependency Installed:
audit-libs-python.x86_64 0:2.2-4.el6_5
libsemanage-python.x86_64 0:2.0.43-4.2.el6
mysql55-mysql.x86_64 0:5.5.37-1.2.el6.centos.alt
mysql55-mysql-libs.x86_64 0:5.5.37-1.2.el6.centos.alt
mysql55-runtime.x86_64 0:1-14.el6.centos.alt
perl-DBD-MySQL.x86_64 0:4.013-3.el6
policycoreutils-python.x86_64 0:2.0.83-19.39.el6
setools-libs.x86_64 0:3.3.7-4.el6
setools-libs-python.x86_64 0:3.3.7-4.el6
Dependency Updated:
audit.x86_64 0:2.2-4.el6_5 audit-libs.x86_64 0:2.2-4.el6_5
Complete!
インストールが終わったので、MySQLを起動する。
# /etc/init.d/mysql55-mysqld start
MySQL データベースを初期化中: WARNING: The host 'centos6' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
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:
/opt/rh/mysql55/root/usr/bin/mysqladmin -u root password 'new-password'
/opt/rh/mysql55/root/usr/bin/mysqladmin -u root -h centos6 password 'new-password'
Alternatively you can run:
/opt/rh/mysql55/root/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 /opt/rh/mysql55/root/usr ; /opt/rh/mysql55/root/usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /opt/rh/mysql55/root/usr/mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
[ OK ]
mysql55-mysqld を起動中: [ OK ]
その後、トラブル発生。
★MySQL5が起動しない問題の対応。
リブート後にMySQL5が起動しなかった時のトラブルシュート。
$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
このエラーが出た場合は、いろいろの可能性が考えられる。
原因を探ると、MySQLが起動していない可能性が。
$ chkconfig --list | grep mysql
mysql55-mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
あかん…… ほんとうに動いてないぞっと。
# chkconfig mysqld on
サービス mysql に関する情報の読み込み中にエラーが発生しました: そのようなファイルやディレクトリはありません
ん????なんで???
ノーマルのMySQLとはちょっと違うのかな??
# chkconfig mysql55-mysqld on
# chkconfig --list | grep mysql
mysql55-mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
今度は大丈夫そう。リブートして確認してみる。
大丈夫、ちゃんと動いてる。
続いて、Mroongaをインストールする。
# yum install -y mysql55-mroonga
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql55-mroonga.x86_64 0:4.03-2.el6 will be installed
--> Processing Dependency: groonga-libs >= 4.0.0 for package: mysql55-mroonga-4.03-2.el6.x86_64
--> Processing Dependency: groonga-normalizer-mysql for package: mysql55-mroonga-4.03-2.el6.x86_64
--> Processing Dependency: libgroonga.so.0()(64bit) for package: mysql55-mroonga-4.03-2.el6.x86_64
--> Running transaction check
---> Package groonga-libs.x86_64 0:4.0.3-1.el6 will be installed
---> Package groonga-normalizer-mysql.x86_64 0:1.0.6-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql55-mroonga x86_64 4.03-2.el6 groonga 173 k
Installing for dependencies:
groonga-libs x86_64 4.0.3-1.el6 groonga 1.0 M
groonga-normalizer-mysql x86_64 1.0.6-1.el6 groonga 63 k
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 1.2 M
Installed size: 3.9 M
Downloading Packages:
(1/3): groonga-libs-4.0.3-1.el6.x86_64.rpm | 1.0 MB 00:01
(2/3): groonga-normalizer-mysql-1.0.6-1.el6.x86_64.rpm | 63 kB 00:00
(3/3): mysql55-mroonga-4.03-2.el6.x86_64.rpm | 173 kB 00:00
--------------------------------------------------------------------------------
Total 790 kB/s | 1.2 MB 00:01
警告: rpmts_HdrFromFdno: ヘッダ V4 DSA/SHA1 Signature, key ID 45499429: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-groonga
Importing GPG key 0x45499429:
Userid : groonga Key (groonga Official Signing Key)
Package: groonga-release-1.1.0-1.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-groonga
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : groonga-libs-4.0.3-1.el6.x86_64 1/3
Installing : groonga-normalizer-mysql-1.0.6-1.el6.x86_64 2/3
Installing : mysql55-mroonga-4.03-2.el6.x86_64 3/3
/opt/rh/mysql55/root/usr/bin/mysql -u root < /opt/rh/mysql55/root/usr/share/mroonga/install.sql
Verifying : groonga-normalizer-mysql-1.0.6-1.el6.x86_64 1/3
Verifying : groonga-libs-4.0.3-1.el6.x86_64 2/3
Verifying : mysql55-mroonga-4.03-2.el6.x86_64 3/3
Installed:
mysql55-mroonga.x86_64 0:4.03-2.el6
Dependency Installed:
groonga-libs.x86_64 0:4.0.3-1.el6
groonga-normalizer-mysql.x86_64 0:1.0.6-1.el6
Complete!
トークナイザーにMeCabを使うので、インストールしておく。
# yum install -y groonga-tokenizer-mecab
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package groonga-tokenizer-mecab.x86_64 0:4.0.3-1.el6 will be installed
--> Processing Dependency: mecab-dic for package: groonga-tokenizer-mecab-4.0.3-1.el6.x86_64
--> Processing Dependency: libmecab.so.2()(64bit) for package: groonga-tokenizer-mecab-4.0.3-1.el6.x86_64
--> Running transaction check
---> Package mecab.x86_64 0:0.996-1.el6 will be installed
---> Package mecab-ipadic.x86_64 0:2.7.0.20070801-8.el6.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
groonga-tokenizer-mecab x86_64 4.0.3-1.el6 groonga 12 k
Installing for dependencies:
mecab x86_64 0.996-1.el6 groonga 2.3 M
mecab-ipadic x86_64 2.7.0.20070801-8.el6.1 groonga 13 M
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 15 M
Installed size: 63 M
Downloading Packages:
(1/3): groonga-tokenizer-mecab-4.0.3-1.el6.x86_64.rpm | 12 kB 00:00
(2/3): mecab-0.996-1.el6.x86_64.rpm | 2.3 MB 00:02
(3/3): mecab-ipadic-2.7.0.20070801-8.el6.1.x86_64.rpm | 13 MB 00:14
--------------------------------------------------------------------------------
Total 698 kB/s | 15 MB 00:22
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mecab-0.996-1.el6.x86_64 1/3
Installing : mecab-ipadic-2.7.0.20070801-8.el6.1.x86_64 2/3
Installing : groonga-tokenizer-mecab-4.0.3-1.el6.x86_64 3/3
Verifying : mecab-0.996-1.el6.x86_64 1/3
Verifying : mecab-ipadic-2.7.0.20070801-8.el6.1.x86_64 2/3
Verifying : groonga-tokenizer-mecab-4.0.3-1.el6.x86_64 3/3
Installed:
groonga-tokenizer-mecab.x86_64 0:4.0.3-1.el6
Dependency Installed:
mecab.x86_64 0:0.996-1.el6 mecab-ipadic.x86_64 0:2.7.0.20070801-8.el6.1
Complete!
途中にいろいろトラブルはあったけれど、とにかく、なんとかインストールは終わったようだ。
MySQL5のrootパスワードは変えておかねば。
$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.37 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET PASSWORD for root@localhost=PASSWORD('hogehoge');
Query OK, 0 rows affected (0.00 sec)
やっとここまで戻って来れた。
3歩進んで10歩下がった感じか。。。
0 件のコメント:
コメントを投稿