Skip to content

Instantly share code, notes, and snippets.

@ronaldbradford
Created November 12, 2017 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronaldbradford/13c6422d0de978036f83e99c3b4d79c0 to your computer and use it in GitHub Desktop.
Save ronaldbradford/13c6422d0de978036f83e99c3b4d79c0 to your computer and use it in GitHub Desktop.
Install Percona 5.6 with TokuDB
# This snippet performs the following for RedHat/CentOS/OL 6.x system
#
# - Clean Installation of Percona Server 5.6.26
# - Clean Installation of TokuDB for said version (e.g. if already exists on server)
# - Configuration and verification of TokuDB
#
# NOTE: Installing via yum is not permitted
# To simulate a base system run:
# vagrant init centos/6; vagrant up --provider virtualbox
# vagrant ssh
# To run this script automatically
# curl -sL https://gist.githubusercontent.com/bradfordpythian/60036b603cf1973c29a0516eead55bc4/raw/a67b1f3ee01e8715b49774a001642f258c56a739/install_tokudb.sh | sh -
# Identify server
cat /etc/redhat-release
uname -a
# update base OS to current packages
sudo yum update -y
# Download and Install Percona Server
cd /tmp
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.26-74.0/binary/redhat/6/x86_64/Percona-Server-5.6.26-74.0-r32f8dfd-el6-x86_64-bundle.tar
tar xvf Percona-Server-5.6.26-74.0-r32f8dfd-el6-x86_64-bundle.tar
sudo rpm -ivh Percona-Server-client-56-5.6.26-rel74.0.el6.x86_64.rpm Percona-Server-server-56-5.6.26-rel74.0.el6.x86_64.rpm Percona-Server-shared-56-5.6.26-rel74.0.el6.x86_64.rpm
rpm -qa | grep -i percona
mysql --version
# Start and Verify Percona Server
sudo service mysql start
sudo chkconfig mysql on
mysql -uroot -e "SELECT VERSION(),@@hostname;"
mysql -uroot -e "SHOW ENGINES" | grep -i tokudb
cd /tmp
# See https://centos.pkgs.org/6/epel-x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm.html
wget http://dl.fedoraproject.org/pub/epel/6/x86_64//jemalloc-3.6.0-1.el6.x86_64.rpm
sudo rpm -ivh jemalloc-3.6.0-1.el6.x86_64.rpm
# jemalloc >= 3.3.0 dependency
sudo rpm -ivh Percona-Server-tokudb-56-5.6.26-rel74.0.el6.x86_64.rpm
if [ `sestatus | grep "^Current.*enforcing" | wc -l` -eq 1 ]
then
sudo setenforce permissive
sudo sed -i "s/^SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config
fi
sudo service mysql restart
sudo ps_tokudb_admin --enable -uroot
mysql -uroot -e "SELECT VERSION(), @@tokudb_version, @@hostname;"
mysql -uroot -e "SHOW ENGINES" | grep -i tokudb
mysql -uroot -e "CREATE SCHEMA IF NOT EXISTS test;USE test; DROP TABLE IF EXISTS t1; CREATE TABLE t1(i1 INT) ENGINE=TokuDB;SHOW CREATE TABLE t1;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment