In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces CentOS 7 how to install TokuDB through source code compilation, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
Because of the specially designed data structure, the read and write performance of TokuDB is better than that of InnoDB in some scenarios. This is the process of installing TokuDB through source code compilation based on centOS 7.
First check the system environment settings:
# vi / etc/security/limits.conf
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
To use tokuDB, you need to close Transparent huge pages:
Echo never > / sys/kernel/mm/transparent_hugepage/enabled
Echo never > / sys/kernel/mm/transparent_hugepage/defrag
Modify selinux:
# vi / etc/selinux/config
To take effect temporarily, you can execute: # setenforce 0
Next, install the dependent package
# yum install cmake gcc gcc-c++ ncurses ncurses-devel bison readline-devel jemalloc zlib zlib-devel valgrind valgrind-devel-y
Ok, basically ready, then enter the actual installation environment of tokuDB. We chose Percona-server version 5.7.11 here.
Download the installation package:
# wget https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.11-4/source/tarball/percona-server-5.7.11-4.tar.gz
Decompress:
# tar xvfz percona-server-5.7.11-4.tar.gz
# cd percona-server-5.7.11-4
Configure the compilation environment:
# cmake. \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\
-DMYSQL_DATADIR=/data/mysqldata/3309\
-DSYSCONFDIR=/data/mysqldata/3309\
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_ARCHIVE_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1\
-DWITH_FEDERATED_STORAGE_ENGINE=1\
-DMYSQL_UNIX_ADDR=/data/mysqldata/3309/mysql.sock\
-DMYSQL_TCP_PORT=3309\
-DENABLED_LOCAL_INFILE=1\
-DENABLE_DOWNLOADS=1\
-DCOMPILATION_COMMENT= "Junsansi's Percona Server"\
-DOPTIMIZER_TRACE=1\
-DWITH_ZLIB=system\
-DWITH_VALGRIND=1\
-DCMAKE_C_FLAGS=-DHAVE_purify\
-DCMAKE_CXX_FLAGS=-DHAVE_purify\
-DWITH_PARTITION_STORAGE_ENGINE=1\
-DEXTRA_CHARSETS=all-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DDOWNLOAD_BOOST=1-DWITH_BOOST=/tmp\
-DZLIB_INCLUDE_DIR=/usr/lib64
#-j4 means to compile with 4 threads
# make-j4
# make install
# cd / data/mysqldata/3309
# mkdir data tmp logs/ {binlog,errorlog,slowlog,relaylog}-p
# chown mysql:mysql.. / 3309-R
Create the database:
# bin/mysql_install_db-defaults-file=/data/mysqldata/3309/my.cnf-basedir=/usr/local/mysqlpercona-datadir=/data/mysqldata/3309/data-user=mysql
Here my.cnf is the initialization parameter file for my copy process from other libraries.
# Note that mysql_install_db has been discarded. It is recommended to use:
# bin/mysqld-initialize-insecure-defaults-file=/data/mysqldata/3309/my.cnf-user=mysql-basedir=/usr/local/mysqlpercona-datadir=/data/mysqldata/3309/data
After the installation is completed, the root user password is initialized by default and saved in:
# more ~ / .mysql_secret
Use this user to log in to the system.
Start the database:
# mysqld_safe-- defaults-file=/data/mysqldata/3309/my.cnf &
$mysql-uroot-pendant xxxxx'- S / data/mysqldata/3309/mysql.sock
Execute a command if you encounter:
ERROR 1820 (HY000): Unknown error 1820
Then it indicates that the password of the administrator account needs to be initialized first. Execute the command as follows:
Mysql > set password=password ('123456')
Mysql > SHOW ENGINES
You can check whether tokuDB is currently supported.
[root@localhost] # / usr/local/mysqlpercona/bin/ps_tokudb_admin-- enable-uroot-pendant 123456'-S / data/mysqldata/3306/mysql.sock
Checking SELinux status...
INFO: SELinux is disabled.
Checking if Percona Server is running with jemalloc enabled...
ERROR: Percona Server is not running with jemalloc, please restart mysql service to enable it and then run this script...
Lack of package, install first
# yum install epel-release
Then you can install jemalloc:
# yum install jemalloc
Then restart mysqld, and then execute ps_tokudb_admin.
Then execute show engines in the database, and you should be able to see the tokuDB engine.
Thank you for reading this article carefully. I hope the article "how to install TokuDB with CentOS 7 compiled by source code" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.