加入收藏 | 设为首页 | 会员中心 | 我要投稿 52站长网 (https://www.52zhanzhang.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

如何进行TokuDB的装置

发布时间:2022-01-14 13:17:35 所属栏目:MySql教程 来源:互联网
导读:本篇文章为大家展示了如何进行TokuDB的安装,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。 一:缘由 监控系统产生的数据相对普通业务数据,具有写入需求占绝对多数,读取相对较少的特点。 之前使用的PMM监控系
       本篇文章为大家展示了如何进行TokuDB的安装,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
 
一:缘由
 
      监控系统产生的数据相对普通业务数据,具有写入需求占绝对多数,读取相对较少的特点。
      之前使用的PMM监控系统,其docker版解决方案,内置的不仅不是其自家的percona分支数据库,而且使用的是较旧的5.5官方分支版本。监控了6个实例的库和主机后。3周后就占用了9GB的空间。
     欣慰的是,Percona公司考虑到这个情况,将会自动根据PMM服务器的硬盘可用容量大小自动定期删除备份的历史数据。
      对一个DBA而言,需要关注到一个库的历史负载情况,方便同比环比进行硬件扩容规划。最起码要2年的完整数据吧。
二:解决方法,
 
        采用高压缩的TokuDB引擎进行压缩存储历史数据。
 
TokuDB is a highly scalable, zero-maintenance downtime MySQL storage engine that delivers indexing-based query acceleration, improved replication performance,     unparalleled compression, and live schema modification. The TokuDB storage engine is a scalable, ACID and MVCC compliant storage engine that provides indexing-based query improvements, offers online schema modifications, and reduces slave lag for both hard disk drives and flash memory.
 
This storage engine is specifically designed for high performance on write-intensive workloads which is achieved with Fractal Tree indexing.
 
三:安装步骤
 
tokudb既可以在官方社区版本的MySQL上启用,也可以在percona分区上启用,考虑到要见识下percona分支版本相对官方版本支持较多的监控特性, 这次使用percona-mysql-server版本
安装前准备
#systemctl
stop firewalld  #停掉系统防火墙
#systemctl mask firewalld  #屏蔽防火墙自启动
#setenforce 0              #关闭SELinux
#sed -i 's/Enforcing/Permissive/g' /etc/selinux/config  #永久关闭SELinux
#创建percona软件源
#cat>/etc/yum.repos.d/percona-release.repo<<EOF
    [percona-release-x86_64]
        name = Percona-Release
YUM repository - x86_64
        baseurl = http://repo.percona.com/release/7Server/RPMS/x86_64
        enabled = 1
        gpgcheck = 1
        gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
 
       [percona-release-noarch]
       name = Percona-Release
YUM repository - noarch
       baseurl = http://repo.percona.com/release/7Server/RPMS/noarch
       enabled = 1
       gpgcheck = 1
       gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
 
       [percona-release-source]
       name = Percona-Release
YUM repository - Source packages
       baseurl = http://repo.percona.com/release/7Server/SRPMS
       enabled = 0
       gpgcheck = 1
       gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
       EOF
       创建软件源倒是有个哏,本来Cent7的系统可以直接在网站上下载epel-release.rpm
 
       进行安装。但是FedoraServer26的版本与repo的自判断特性不太兼容。这里我手动将
 
       系统变量判断手动改成了7Server,即与RHCE/Cent7使用同样的源。
 
 3.开始安装
 
   #安装percona分支MySQL,和相关的备份与工具软件
 
#yum -y install  percona-toolkit percona-xtrabackup
Percona-Server-server-57
   #安装依赖库,这也是坑,fedora源中jemalloc是4.5版本,不兼容。需要手动安装4.0版本以下的
 
    大家如果用的CentOS/RHCE应该没问题的。
 
#yum -y install ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/j/jemalloc-3.6.0-9.fc23.x86_64.rpm
    #安装TokuDB引擎插件
 
#yum -y install Percona-Server-tokudb-57
    #启用插件(mysqld进程需要在运行状态)
 
#ps-admin --enable-tokudb -u root -p
#systemctl restart mysqld
#ps-admin --enable-tokudb -u root -p

(编辑:52站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读