MyRocks安装部署
参考:https://www.cnblogs.com/WonderHow/p/5621591.html
CentOS 7.3
gflags:git clone https://github.com/gflags/gflags.git
lz4:git clone https://github.com/Cyan4973/lz4
gflags:
编译安装gflags
cmake提示错误:
cmake .
CMake Error at CMakeLists.txt:73 (cmake_minimum_required):
CMake 3.0.2 or higher is required. You are running version 2.8.12.2
安装高版本cmake3.0.2
下载地址:https://cmake.org/download/
# ln -s cmake-3.13.2-Linux-x86_64/bin/cmake /usr/bin/cmake
# cmake --version
cmake version 3.13.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
再次,编译安装gflags
cd gflags
# mkdir build && cd build
# cmake ..
# make
# make test (optional)
# make install (optional)
lz4:
编译安装lz4
Installation
make
make install # this command may require root permissions
利用git从myrocks的github主页将项目clone下来:
# cd mysql-5.6
# git submodule init
# git submodule update
编译后应该进行安装:
rocksdb编译步骤:http://www.mamicode.com/info-detail-2205244.html
Linux - CentOS / RHEL Upgrade your gcc to version at least 4.8 to get C++11 support: yum install gcc48-c++ Install gflags: git clone https://github.com/gflags/gflags.git cd gflags git checkout v2.0 ./configure && make && sudo make install Notice: Once installed, please add the include path for gflags to your CPATH environment variable and the lib path to LIBRARY_PATH. If installed with default settings, the include path will be /usr/local/include and the lib path will be /usr/local/lib. Install snappy: sudo yum install snappy snappy-devel Install zlib: sudo yum install zlib zlib-devel Install bzip2: sudo yum install bzip2 bzip2-devel Install lz4: sudo yum install lz4-devel Install ASAN (optional for debugging): sudo yum install libasan Install zstandard: wget https://github.com/facebook/zstd/archive/v1.1.3.tar.gz mv v1.1.3.tar.gz zstd-1.1.3.tar.gz tar zxvf zstd-1.1.3.tar.gz cd zstd-1.1.3 make && sudo make install
[root@standby05 mysql-5.6]# cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DENABLED_LOCAL_INFILE=1
mysql_install_db --defaults-file=/data/mysql_33061/my.cnf --datadir=/data/mysql_33061/data --basedir=/usr/local/myrocks &
启动:
mysqld --defaults-file=/data/mysql_33061/my.cnf &
[client]
socket=/data/mysql_33061/run/mysql.sock
port=33061
[mysql]
port=33061
prompt=\\u@\\d \\r:\\m:\\s>
default-character-set=utf8mb4
no-auto-rehash
[mysqld_safe]
pid-file=/data/mysql_33061/run/mysqld.pid
[mysqld]
rocksdb
default-storage-engine=rocksdb
skip-innodb
default-tmp-storage-engine=MyISAM
collation-server=utf8_bin
log-bin
binlog-format=ROW