AWSでLAMP環境構築③
前回に引き続きMysqlのセットアップを行う。
1.gronnga のインストール
$ sudo yum install -y http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm 読み込んだプラグイン:priorities, update-motd, upgrade-helper groonga-release-1.1.0-1.noarch.rpm | 6.2 kB 00:00 /var/tmp/yum-root-se6CaG/groonga-release-1.1.0-1.noarch.rpm を調べています: groonga-release-1.1.0-1.noarch /var/tmp/yum-root-se6CaG/groonga-release-1.1.0-1.noarch.rpm をインストール済みとして設定しています 依存性の解決をしています amzn-main/latest | 2.1 kB 00:00 amzn-updates/latest | 2.3 kB 00:00 --> トランザクションの確認を実行しています。 ---> パッケージ groonga-release.noarch 0:1.1.0-1 を インストール --> 依存性解決を終了しました。 依存性を解決しました ==================================================================================================================================== Package アーキテクチャー バージョン リポジトリー 容量 ==================================================================================================================================== インストール中: groonga-release noarch 1.1.0-1 /groonga-release-1.1.0-1.noarch 3.6 k トランザクションの要約 ==================================================================================================================================== インストール 1 パッケージ 合計容量: 3.6 k インストール容量: 3.6 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : groonga-release-1.1.0-1.noarch 1/1 検証中 : groonga-release-1.1.0-1.noarch 1/1 インストール: groonga-release.noarch 0:1.1.0-1 完了しました!
2.0.パッケージの更新前準備
sudo vim /etc/yum.repos.d/groonga.repo [groonga] name= for CentOS $releasever - $basearch baseurl=http://packages.groonga.org/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-groonga ここのbaseurlをいかに書き換える baseurl=http://packages.groonga.org/centos/6/$basearch/
2.パッケージの更新
$ sudo yum makecache 読み込んだプラグイン:priorities, update-motd, upgrade-helper amzn-main/latest | 2.1 kB 00:00 amzn-main/latest/filelists_db | 4.7 MB 00:00 amzn-main/latest/other_db | 16 MB 00:00 amzn-updates/latest | 2.3 kB 00:00 amzn-updates/latest/filelists_db | 215 kB 00:00 amzn-updates/latest/other_db | 729 kB 00:00 groonga/x86_64 | 2.5 kB 00:00 groonga/x86_64/filelists_db | 284 kB 00:00 groonga/x86_64/primary_db | 190 kB 00:00 groonga/x86_64/other_db | 239 kB 00:00 メタデータのキャッシュを作成しました
3.mysqlのインストール
$ sudo yum install -y mysql55-server 読み込んだプラグイン:priorities, update-motd, upgrade-helper 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ mysql55-server.x86_64 0:5.5.42-1.4.amzn1 を インストール --> 依存性の処理をしています: real-mysql55-common(x86-64) = 5.5.42-1.4.amzn1 のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: real-mysql55(x86-64) = 5.5.42-1.4.amzn1 のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: real-mysql55-libs(x86-64) = 5.5.42-1.4.amzn1 のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: perl(Data::Dumper) のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: perl(DBI) のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: perl-DBI のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> 依存性の処理をしています: perl-DBD-MySQL のパッケージ: mysql55-server-5.5.42-1.4.amzn1.x86_64 --> トランザクションの確認を実行しています。 ---> パッケージ mysql55.x86_64 0:5.5.42-1.4.amzn1 を インストール ---> パッケージ mysql55-common.x86_64 0:5.5.42-1.4.amzn1 を インストール ---> パッケージ mysql55-libs.x86_64 0:5.5.42-1.4.amzn1 を インストール ---> パッケージ perl-DBD-MySQL.x86_64 0:4.023-5.17.amzn1 を インストール ---> パッケージ perl-DBI.x86_64 0:1.627-4.8.amzn1 を インストール --> 依存性の処理をしています: perl(RPC::PlClient) >= 0.2000 のパッケージ: perl-DBI-1.627-4.8.amzn1.x86_64 --> 依存性の処理をしています: perl(RPC::PlServer) >= 0.2001 のパッケージ: perl-DBI-1.627-4.8.amzn1.x86_64 ---> パッケージ perl-Data-Dumper.x86_64 0:2.145-3.5.amzn1 を インストール --> トランザクションの確認を実行しています。 ---> パッケージ perl-PlRPC.noarch 0:0.2020-14.7.amzn1 を インストール --> 依存性の処理をしています: perl(Net::Daemon) >= 0.13 のパッケージ: perl-PlRPC-0.2020-14.7.amzn1.noarch --> 依存性の処理をしています: perl(Compress::Zlib) のパッケージ: perl-PlRPC-0.2020-14.7.amzn1.noarch --> 依存性の処理をしています: perl(Net::Daemon::Test) のパッケージ: perl-PlRPC-0.2020-14.7.amzn1.noarch --> 依存性の処理をしています: perl(Net::Daemon::Log) のパッケージ: perl-PlRPC-0.2020-14.7.amzn1.noarch --> トランザクションの確認を実行しています。 ---> パッケージ perl-IO-Compress.noarch 0:2.061-2.12.amzn1 を インストール --> 依存性の処理をしています: perl(Compress::Raw::Zlib) >= 2.061 のパッケージ: perl-IO-Compress-2.061-2.12.amzn1.noarch --> 依存性の処理をしています: perl(Compress::Raw::Bzip2) >= 2.061 のパッケージ: perl-IO-Compress-2.061-2.12.amzn1.noarch ---> パッケージ perl-Net-Daemon.noarch 0:0.48-5.5.amzn1 を インストール --> トランザクションの確認を実行しています。 ---> パッケージ perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.11.amzn1 を インストール ---> パッケージ perl-Compress-Raw-Zlib.x86_64 1:2.061-4.1.amzn1 を インストール --> 依存性解決を終了しました。 依存性を解決しました ==================================================================================================================================== Package アーキテクチャー バージョン リポジトリー 容量 ==================================================================================================================================== インストール中: mysql55-server x86_64 5.5.42-1.4.amzn1 amzn-main 13 M 依存性関連でのインストールをします: mysql55 x86_64 5.5.42-1.4.amzn1 amzn-main 7.5 M mysql55-common x86_64 5.5.42-1.4.amzn1 amzn-main 48 k mysql55-libs x86_64 5.5.42-1.4.amzn1 amzn-main 813 k perl-Compress-Raw-Bzip2 x86_64 2.061-3.11.amzn1 amzn-main 33 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.1.amzn1 amzn-main 61 k perl-DBD-MySQL x86_64 4.023-5.17.amzn1 amzn-main 148 k perl-DBI x86_64 1.627-4.8.amzn1 amzn-main 855 k perl-Data-Dumper x86_64 2.145-3.5.amzn1 amzn-main 49 k perl-IO-Compress noarch 2.061-2.12.amzn1 amzn-main 298 k perl-Net-Daemon noarch 0.48-5.5.amzn1 amzn-main 58 k perl-PlRPC noarch 0.2020-14.7.amzn1 amzn-main 39 k トランザクションの要約 ==================================================================================================================================== インストール 1 パッケージ (+11 個の依存関係のパッケージ) 総ダウンロード容量: 23 M インストール容量: 80 M Downloading packages: (1/12): mysql55-5.5.42-1.4.amzn1.x86_64.rpm | 7.5 MB 00:00 (2/12): mysql55-common-5.5.42-1.4.amzn1.x86_64.rpm | 48 kB 00:00 (3/12): mysql55-libs-5.5.42-1.4.amzn1.x86_64.rpm | 813 kB 00:00 (4/12): mysql55-server-5.5.42-1.4.amzn1.x86_64.rpm | 13 MB 00:00 (5/12): perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64.rpm | 33 kB 00:00 (6/12): perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64.rpm | 61 kB 00:00 (7/12): perl-DBD-MySQL-4.023-5.17.amzn1.x86_64.rpm | 148 kB 00:00 (8/12): perl-DBI-1.627-4.8.amzn1.x86_64.rpm | 855 kB 00:00 (9/12): perl-Data-Dumper-2.145-3.5.amzn1.x86_64.rpm | 49 kB 00:00 (10/12): perl-IO-Compress-2.061-2.12.amzn1.noarch.rpm | 298 kB 00:00 (11/12): perl-Net-Daemon-0.48-5.5.amzn1.noarch.rpm | 58 kB 00:00 (12/12): perl-PlRPC-0.2020-14.7.amzn1.noarch.rpm | 39 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------ 合計 30 MB/s | 23 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : mysql55-libs-5.5.42-1.4.amzn1.x86_64 1/12 インストール中 : perl-Data-Dumper-2.145-3.5.amzn1.x86_64 2/12 インストール中 : mysql55-common-5.5.42-1.4.amzn1.x86_64 3/12 インストール中 : mysql55-5.5.42-1.4.amzn1.x86_64 4/12 インストール中 : perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64 5/12 インストール中 : perl-Net-Daemon-0.48-5.5.amzn1.noarch 6/12 インストール中 : 1:perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64 7/12 インストール中 : perl-IO-Compress-2.061-2.12.amzn1.noarch 8/12 インストール中 : perl-PlRPC-0.2020-14.7.amzn1.noarch 9/12 インストール中 : perl-DBI-1.627-4.8.amzn1.x86_64 10/12 インストール中 : perl-DBD-MySQL-4.023-5.17.amzn1.x86_64 11/12 インストール中 : mysql55-server-5.5.42-1.4.amzn1.x86_64 12/12 検証中 : mysql55-server-5.5.42-1.4.amzn1.x86_64 1/12 検証中 : perl-DBI-1.627-4.8.amzn1.x86_64 2/12 検証中 : mysql55-common-5.5.42-1.4.amzn1.x86_64 3/12 検証中 : perl-IO-Compress-2.061-2.12.amzn1.noarch 4/12 検証中 : mysql55-libs-5.5.42-1.4.amzn1.x86_64 5/12 検証中 : perl-DBD-MySQL-4.023-5.17.amzn1.x86_64 6/12 検証中 : 1:perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64 7/12 検証中 : perl-Net-Daemon-0.48-5.5.amzn1.noarch 8/12 検証中 : perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64 9/12 検証中 : perl-PlRPC-0.2020-14.7.amzn1.noarch 10/12 検証中 : perl-Data-Dumper-2.145-3.5.amzn1.x86_64 11/12 検証中 : mysql55-5.5.42-1.4.amzn1.x86_64 12/12 インストール: mysql55-server.x86_64 0:5.5.42-1.4.amzn1 依存性関連をインストールしました: mysql55.x86_64 0:5.5.42-1.4.amzn1 mysql55-common.x86_64 0:5.5.42-1.4.amzn1 mysql55-libs.x86_64 0:5.5.42-1.4.amzn1 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.11.amzn1 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.1.amzn1 perl-DBD-MySQL.x86_64 0:4.023-5.17.amzn1 perl-DBI.x86_64 0:1.627-4.8.amzn1 perl-Data-Dumper.x86_64 0:2.145-3.5.amzn1 perl-IO-Compress.noarch 0:2.061-2.12.amzn1 perl-Net-Daemon.noarch 0:0.48-5.5.amzn1 perl-PlRPC.noarch 0:0.2020-14.7.amzn1 完了しました!
4.mysqlサーバ起動
$ sudo /etc/init.d/mysql.d 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 ip-172-31-36-70 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 at http://bugs.mysql.com/ [ OK ] mysqld を起動中: [ OK ]
5.mronngaのインストール
sudo yum install -y mysql55-mroonga
読み込んだプラグイン:priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
依存性の解決をしています
-
- > トランザクションの確認を実行しています。
- > パッケージ mysql55-mroonga.x86_64 0:5.01-1.el6 を インストール
- > 依存性の処理をしています: mysql55-mysql-server = 5.5.41-2.el6.centos.alt のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: mysql55-mysql = 5.5.41-2.el6.centos.alt のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: groonga-libs >= 5.0.0 のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: mysql55-runtime のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: groonga-normalizer-mysql のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: libgroonga.so.0()(64bit) のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > トランザクションの確認を実行しています。
- > 依存性の処理をしています: mysql55-mysql-server = 5.5.41-2.el6.centos.alt のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: mysql55-mysql = 5.5.41-2.el6.centos.alt のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性の処理をしています: mysql55-runtime のパッケージ: mysql55-mroonga-5.01-1.el6.x86_64
- > 依存性解決を終了しました。
- > トランザクションの確認を実行しています。
エラー: パッケージ: mysql55-mroonga-5.01-1.el6.x86_64 (groonga)
要求: mysql55-mysql = 5.5.41-2.el6.centos.alt
エラー: パッケージ: mysql55-mroonga-5.01-1.el6.x86_64 (groonga)
要求: mysql55-mysql-server = 5.5.41-2.el6.centos.alt
エラー: パッケージ: mysql55-mroonga-5.01-1.el6.x86_64 (groonga)
要求: mysql55-runtime
問題を回避するために --skip-broken を用いることができます。
これらを試行できます: rpm -Va --nofiles --nodigestyum