【MySQL备份恢复】mydumper安装

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 (Maipo)

安装MySQL数据库
# yum install cmake
[root@zedba mydumper-0.9.1]# cmake .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Using mysql-config: /bin/mysql_config
-- MySQL not found.
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.7")

CMake Warning at docs/CMakeLists.txt:9 (message):
Unable to find Sphinx documentation generator


-- ------------------------------------------------
-- MYSQL_CONFIG = /bin/mysql_config
-- CMAKE_INSTALL_PREFIX = /usr/local
-- BUILD_DOCS = ON
-- WITH_BINLOG = OFF
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>=<Value>
-- ------------------------------------------------
--
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MYSQL_LIBRARIES_crypto
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1
MYSQL_LIBRARIES_dl
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1
MYSQL_LIBRARIES_m
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1
MYSQL_LIBRARIES_pthread
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1
MYSQL_LIBRARIES_ssl
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1
MYSQL_LIBRARIES_z
linked by target "mydumper" in directory /tkdba/mydumper-0.9.1
linked by target "myloader" in directory /tkdba/mydumper-0.9.1

-- Configuring incomplete, errors occurred!
See also "/tkdba/mydumper-0.9.1/CMakeFiles/CMakeOutput.log".
See also "/tkdba/mydumper-0.9.1/CMakeFiles/CMakeError.log".

# yum install -y git gcc gcc-c++ ncurses-devel bison
# yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel

[root@zedba mydumper-0.9.1]# cmake .
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using mysql-config: /bin/mysql_config
-- Found MySQL: /usr/include/mysql, /usr/lib64/mysql/libmysqlclient.so;/usr/lib64/libpthread.so;/usr/lib64/libz.so;/usr/lib64/libm.so;/usr/lib64/libdl.so;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Found PkgConfig: /bin/pkg-config (found version "0.27.1")
-- checking for one of the modules 'glib-2.0'
-- checking for one of the modules 'gthread-2.0'
-- checking for module 'libpcre'
-- found libpcre, version 8.32
-- Found PCRE: /usr/include

CMake Warning at docs/CMakeLists.txt:9 (message):
Unable to find Sphinx documentation generator


-- ------------------------------------------------
-- MYSQL_CONFIG = /bin/mysql_config
-- CMAKE_INSTALL_PREFIX = /usr/local
-- BUILD_DOCS = ON
-- WITH_BINLOG = OFF
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>=<Value>
-- ------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /tkdba/mydumper-0.9.1

cmake失败,重新cmake之前,删除mydumper-0.9.1,重新解压
[root@zedba mydumper-0.9.1]# make
Scanning dependencies of target mydumper
[ 25%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
[ 50%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
[ 75%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
Linking C executable mydumper
[ 75%] Built target mydumper
Scanning dependencies of target myloader
[100%] Building C object CMakeFiles/myloader.dir/myloader.c.o
Linking C executable myloader
[100%] Built target myloader
[root@zedba mydumper-0.9.1]# make install
[ 75%] Built target mydumper
[100%] Built target myloader
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/mydumper
-- Removed runtime path from "/usr/local/bin/mydumper"
-- Installing: /usr/local/bin/myloader
-- Removed runtime path from "/usr/local/bin/myloader"
[root@zedba mydumper-0.9.1]#

 

posted on 2021-12-05 16:33  HelonTian  阅读(281)  评论(0编辑  收藏  举报