您好,登錄后才能下訂單哦!
這篇文章主要介紹了如何使用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中。
Percona Server跟MySQL一樣有多種安裝方法:yum Repositories、rpm、Binary Tarball、Source Tarball、Git Source Tree等,可以根據實際環境選擇,具體安裝步驟請參考官方文檔。下文主要以rpm包在RHEL 6上的安裝為例說明主要步驟
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
]# 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
]#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%]
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
注:配置文件有很多選項,具體的根據實際需求配置,此處只是簡單配置了下而已
]# /etc/init.d/mysql start
Starting MySQL (Percona Server).............[ OK ]
]# /etc/init.d/mysql status
MySQL (Percona Server) running (3369)[ OK ]
]# /etc/init.d/mysql stop
Shutting down MySQL (Percona Server)..[ OK ]
]# /etc/init.d/mysql restart
Shutting down MySQL (Percona Server)..[ OK ]
Starting MySQL (Percona Server).....[ OK ]
]# 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
]# /etc/init.d/mysql stop
Shutting down MySQL (Percona Server)..[ OK ]
]# 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
]# rm -rf /var/lib/mysql/ /etc/my.cnf
注:這里將刪除所有的數據文件(databases, tables, logs, etc.),可能你環境中的datafile的位置并不是默認的/var/lib/mysql,而是其他的目錄,卸載的時候根據實際情況刪除文件
感謝你能夠認真閱讀完這篇文章,希望小編分享的“如何使用rpm包方式安裝Percona server”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。