如何使用rpm包方式安装Perconaserver
这篇文章主要介绍了如何使用rpm包方式安装Percona server,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
十余年的北关网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。营销型网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整北关建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联公司从事“北关网站设计”,“北关网站推广”以来,每个客户项目都认真落实执行。
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上的安装为例说明主要步骤
InstallingPercona 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
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 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 thePercona 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”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!
本文标题:如何使用rpm包方式安装Perconaserver
文章链接:http://ybzwz.com/article/pgdics.html