CentOS7安装Percona Server for MySQL 5.7(yum)

白星海
2023-12-01

centos7安装Percona Server for MySQL 5.7

一、yum安装

1.安装Percona yum存储库

yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

2.启用Percona Server 5.7存储库

percona-release setup ps57

3.输出如下所示表示成功:

* Disabling all Percona Repositories
* Enabling the Percona Server 5.7 repository
* Enabling the Percona XtraBackup 2.4 repository
<*> All done!

4.yum list列出存储库安装包

[root@localhost mysql]# yum list | grep 5.7.4

输出如下所示:

Percona-Server-57-debuginfo.x86_64          5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-client-57.x86_64             5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-devel-57.x86_64              5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-rocksdb-57.x86_64            5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-server-57.x86_64             5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-shared-57.x86_64             5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-shared-compat-57.x86_64      5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-test-57.x86_64               5.7.41-44.1.el7            ps-57-release-x86_64
Percona-Server-tokudb-57.x86_64             5.7.41-44.1.el7            ps-57-release-x86_64	

5.安装Percona-Server-server-57

yum install Percona-Server-server-57

Percona Server for MySQL 5.7附带TokuDB存储引擎。可以在TokuDB安装指南中找到有关如何安装和启用TokuDB存储的更多信息。https://docs.percona.com/percona-server/5.7/installation/
或者参考我的安装文档https://blog.csdn.net/xiaoma19961101/article/details/129414816

二、rpm安装

1.下载rpm压缩包

$ wget https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.31-34/binary/redhat/7/x86_64/Percona-Server-5.7.31-34-r2e68637-el7-x86_64-bundle.tar	

2.解压

tar xvf Percona-Server-5.7.31-34-r2e68637-el7-x86_64-bundle.tar

3.安装

rpm -ivh Percona-Server-server-57-5.7.31-34.1.el7.x86_64.rpm \
Percona-Server-client-57-5.7.31-34.1.el7.x86_64.rpm \
Percona-Server-shared-57-5.7.31-34.1.el7.x86_64.rpm

或者安装所有

rpm -ivh *.rpm

三、安装后文件的默认位置

FilesLocation
mysqld server/usr/bin
Configuration/etc/my.cnf
Data directory/var/lib/mysql
Logs/var/log/mysqld.log

四、启动/关闭mysql

service mysql start
service mysql stop
service mysql restart

五、卸载

yum remove Percona-Server*
service mysql stop

删除相关数据

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

六、RHEL 8和其他EL8系统默认启用MySQL模块。此模块隐藏Percona提供的包,必须禁用该模块才能使这些包可见。以下命令将禁用该模块:

yum module disable mysql
 类似资料: