温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何使用rpm包方式安装Percona server

发布时间:2021-11-01 15:53:47 来源:亿速云 阅读:310 作者:小新 栏目:MySQL数据库

这篇文章主要介绍了如何使用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 ServerMySQL一样有多种安装方法:yum RepositoriesrpmBinary TarballSource TarballGit Source Tree等,可以根据实际环境选择,具体安装步骤请参考官方文档。下文主要以rpm包在RHEL 6上的安装为例说明主要步骤

Installing Percona Server using rpm packages

1下载软件包

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

如何使用rpm包方式安装Percona server

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%]

如何使用rpm包方式安装Percona server

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 Server

1. 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 Server

1. 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,而是其他的目录,卸载的时候根据实际情况删除文件

感谢你能够认真阅读完这篇文章,希望小编分享的“如何使用rpm包方式安装Percona server”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI