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

image

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.10libssl.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%]

clip_image003

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

 

参考:
https://www.percona.com/doc/percona-server/5.6/installation/yum_repo.html

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27000195/viewspace-2093534/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27000195/viewspace-2093534/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值