安裝 percona-release-0.1-4.noarch.rpm
[root@pxc57 ~]# yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm

看看提供哪些套件
[root@pxc57 ~]# sudo yum list | grep percona

安裝Percona-XtraDB-Cluster-57
[root@pxc57 ~]# yum install Percona-XtraDB-Cluster-57

Installed:
 Percona-XtraDB-Cluster-57.x86_64 0:5.7.21-29.26.1.el7 Percona-XtraDB-Cluster-shared-57.x86_64 0:5.7.21-29.26.1.el7 Percona-XtraDB-Cluster-shared-compat-57.x86_64 0:5.7.21-29.26.1.el7

Dependency Installed:
 Percona-XtraDB-Cluster-client-57.x86_64 0:5.7.21-29.26.1.el7 Percona-XtraDB-Cluster-server-57.x86_64 0:5.7.21-29.26.1.el7 libaio.x86_64 0:0.3.109-13.el7 libev.x86_64 0:4.15-7.el7
 lsof.x86_64 0:4.87-5.el7 percona-xtrabackup-24.x86_64 0:2.4.11-1.el7 perl.x86_64 4:5.16.3-292.el7 perl-Carp.noarch 0:1.26-244.el7
 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBD-MySQL.x86_64 0:4.023-6.el7 perl-DBI.x86_64 0:1.627-4.el7
 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-Digest.noarch 0:1.17-245.el7 perl-Digest-MD5.x86_64 0:2.52-3.el7 perl-Encode.x86_64 0:2.51-7.el7
 perl-Exporter.noarch 0:5.68-3.el7 perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 perl-Filter.x86_64 0:1.49-3.el7
 perl-Getopt-Long.noarch 0:2.40-3.el7 perl-HTTP-Tiny.noarch 0:0.033-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7
 perl-PathTools.x86_64 0:3.40-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 perl-Pod-Escapes.noarch 1:1.04-292.el7 perl-Pod-Perldoc.noarch 0:3.20-4.el7
 perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 perl-Socket.x86_64 0:2.010-4.el7
 perl-Storable.x86_64 0:2.45-3.el7 perl-Text-ParseWords.noarch 0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7
 perl-constant.noarch 0:1.27-2.el7 perl-libs.x86_64 4:5.16.3-292.el7 perl-macros.x86_64 4:5.16.3-292.el7 perl-parent.noarch 1:0.225-244.el7
 perl-podlators.noarch 0:2.5.1-3.el7 perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7 qpress.x86_64 0:11-1.el7
 rsync.x86_64 0:3.1.2-4.el7 socat.x86_64 0:1.7.3.2-2.el7

Replaced:
 mariadb-libs.x86_64 1:5.5.56-2.el7

Complete!

啟動mysql
[root@pxc57 ~]# service mysql start

Redirecting to /bin/systemctl start mysql.service

第一次啟動mysql時,系統會給一個亂數密碼,不再是給空密碼了
[root@pxc57 ~]# grep 'temporary password' /var/log/mysqld.log

2018-06-12T05:38:12.965266Z 1 [Note] A temporary password is generated for root@localhost: xxxxxx
 

安裝過程中如果出現以下類似的錯誤訊息
Downloading packages:
warning: /var/cache/yum/x86_64/7/percona-release-x86_64/packages/Percona-XtraDB-Cluster-57-5.7.26-31.37.1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8507efa5: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona


The GPG keys listed for the "Percona-Release YUM repository - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: Percona-XtraDB-Cluster-57-5.7.26-31.37.1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona

請先執行以下指令

[root@pxc57 ~]# yum update percona-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tc.edu.tw
 * extras: ftp.tc.edu.tw
 * updates: ftp.tc.edu.tw
Resolving Dependencies
--> Running transaction check
---> Package percona-release.noarch 0:0.1-6 will be updated
---> Package percona-release.noarch 0:1.0-11 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                     Arch                                               Version                                             Repository                                                          Size
=============================================================================================================================================================================================================================================
Updating:
 percona-release                                             noarch                                             1.0-11                                              percona-release-noarch                                              16 k

Transaction Summary
=============================================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 16 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
percona-release-1.0-11.noarch.rpm                                                                                                                                                                                     |  16 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : percona-release-1.0-11.noarch                                                                                                                                                                                             1/2
* Enabling the Percona Original repository
<*> All done!
The percona-release package now contains a percona-release script that can enable additional repositories for our newer products.

For example, to enable the Percona Server 8.0 repository use:

  percona-release setup ps80

Note: To avoid conflicts with older product versions, the percona-release setup command may disable our original repository for some products.

For more information, please visit:
  https://www.percona.com/doc/percona-repo-config/percona-release.html

  Cleanup    : percona-release-0.1-6.noarch                                                                                                                                                                                              2/2
  Verifying  : percona-release-1.0-11.noarch                                                                                                                                                                                             1/2
  Verifying  : percona-release-0.1-6.noarch                                                                                                                                                                                              2/2

Updated:
  percona-release.noarch 0:1.0-11

Complete!

undefined
PHP、MySQL與JavaScript學習手冊(第五版)
Learning PHP, MySQL & JavaScript, 5th Edition

作者: Robin Nixon  
譯者: 賴屹民
出版社:歐萊禮 

 

文章標籤

創作者介紹
創作者 helloworld 的頭像
helloworld

Hello World

helloworld 發表在 痞客邦 留言(0) 人氣()