rpm包方式安裝Percona Server

來源:互聯網
上載者:User

rpm包方式安裝Percona Server

Percona XtraDB是 InnoDB 儲存引擎的增強版,被設計用來更好的使用更新電腦硬體系統的效能,同時還包含有一些在高效能環境下的新特性。XtraDB 儲存引擎是完全的向下相容,於是完全可以使用XtraDB來替代InnoDB儲存引擎。

Percona XtraDB 包含有所有 InnoDB's 健壯性,可依賴的 ACID 相容設計和進階 MVCC 架構。XtraDB 在 InnoDB 的堅實基礎上構建,使 XtraDB 具有更多的特性,更好調用,更多的參數指標和更多的擴充。

尤其是,XtraDB 被設計用來在多核心的條件下更有效使用記憶體和更加方便,更加可用。也解除了InnoDB的很多限制;提供了比InnoDB更多的配置和效能監控參數。

Percona XtraDB engine包含在Percona Server and MariaDB

Installing Percona Server on Red Hat Enterprise Linux

Percona Server跟MySQL一樣有多種安裝方法:yum Repositories、rpm、Binary Tarball、Source Tarball、Git Source Tree等,可以根據實際環境選擇,具體安裝步驟請參考官方文檔。下文主要以rpm包在RHEL 6上的安裝為例說明主要步驟

Installing Percona Server using rpm packages1下載軟體包

wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.29-76.2/binary/redhat/6/x86_64/Percona-Server-5.6.29-76.2-rddf26fe-el6-x86_64-bundle.tar

2 解壓tar包

# tar -xvf Percona-Server-5.6.29-76.2-rddf26fe-el6-x86_64-bundle.tar

# ls *.rpm

Percona-Server-56-debuginfo-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-tokudb-56-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-devel-56-5.6.29-rel76.2.el6.x86_64.rpm

Percona-Server-test-56-5.6.29-rel76.2.el6.x86_64.rpm

3 安裝Percona Server

#rpm -ivh Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64.rpm \

Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64.rpm \

Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64.rpm

#以上三個rpm包僅僅為了完成Percona server的安裝

#若需要(包含debugging, testing,etc等),則直接安裝所有的rpm包即可

#rpm -ivh *.rpm

附:RHEL6上安裝報錯:libcrypto.so.10和libssl.so.10

error: Failed dependencies:

       libcrypto.so.10(libcrypto.so.10)(64bit) is needed by Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64

       libssl.so.10(libssl.so.10)(64bit) is needed by Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64

       libcrypto.so.10(libcrypto.so.10)(64bit) is needed by Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64

        libssl.so.10(libssl.so.10)(64bit) is needed by Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64

#RedHat EL6內建openssl-1.0.0版本,對於Percona-Server應該安裝openssl-1.0.1的版本,安裝新版本後,問題解決

# rpm -ivh openssl10-libs-1.0.1e-1.ius.el6.x86_64.rpm --force

warning: openssl10-libs-1.0.1e-1.ius.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY

Preparing...                ########################################### [100%]

  1:openssl10-libs        ########################################### [100%]

4 設定檔

Percona Server預設的資料檔案路徑在/var/lib/mysql/下

#編輯設定檔/etc/my.cnf

# cat /etc/my.cnf

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

log-error=/var/log/mysqld.log

innodb_buffer_pool_size = 128M

註:設定檔有很多選項,具體的根據實際需求配置,此處只是簡單配置了下而已

5 運行Percona Server1. Starting the service

# /etc/init.d/mysql start

Starting MySQL (Percona Server).............[  OK  ]

2. Confirming that service is running

# /etc/init.d/mysql status

MySQL (Percona Server) running (3369)[  OK  ]

3. Stopping the service

# /etc/init.d/mysql stop

Shutting down MySQL (Percona Server)..[  OK  ]

4. Restarting the service

# /etc/init.d/mysql restart

Shutting down MySQL (Percona Server)..[  OK  ]

Starting MySQL (Percona Server).....[  OK  ]

6 查看log

# tail -f /var/log/mysqld.log

2016-05-03 16:28:23 3595 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.29-76.2 started; log sequence number 1626007

2016-05-03 16:28:23 3595 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.

2016-05-03 16:28:23 3595 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.

2016-05-03 16:28:23 3595 [Note] Server hostname (bind-address): '*'; port: 3306

2016-05-03 16:28:23 3595 [Note] IPv6 is available.

2016-05-03 16:28:23 3595 [Note]  - '::' resolves to '::';

2016-05-03 16:28:23 3595 [Note] Server socket created on IP: '::'.

2016-05-03 16:28:23 3595 [Note] Event Scheduler: Loaded 0 events

2016-05-03 16:28:23 3595 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.6.29-76.2'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Percona Server (GPL), Release 76.2, Revision ddf26fe

7 卸載Percona Server1. Stop the Percona Server service

# /etc/init.d/mysql stop

Shutting down MySQL (Percona Server)..[  OK  ]

2. Remove the packages

# rpm -qa|grep -i percona

Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64

Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64

Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64

# rpm -e Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64 \

 Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64 \

 Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64

# rpm -qa|grep -i percona

3. Remove the data and configuration files

# rm -rf /var/lib/mysql/ /etc/my.cnf

註:這裡將刪除所有的資料檔案(databases, tables, logs, etc.),可能你環境中的datafile的位置並不是預設的/var/lib/mysql,而是其他的目錄,卸載的時候根據實際情況刪除檔案

如何在 CentOS 7 上安裝 Percona Server 

Percona Server 使用了一些 google-mysql-tools, Proven Scaling, Open Query 對 MySQL 進行改造。

CentOS中編譯安裝Percona Server 5.5.42出現問題解決一例 

Percona Server 5.6跟5.5的差異統計 

CentOS中編譯安裝Percona Server 5.5.42出現問題解決一例 

Percona Server 的詳細介紹:請點這裡
Percona Server 的:請點這裡

本文永久更新連結地址:

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.