Environment: centos6.5.x86_64
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.27.tar.gz
Yum install-y CMake Of course can also download the source package installation, for the convenience of Yum installed
Useradd-s/sbin/nologin MySQL
Tar zxvf mysql-5.6.27.tar.gz
Mkdir-p/data/mysql
Chown-r Mysql:mysql/data/mysql
CD mysql-5.6.27
CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/mysql/data-ddefault_charset=utf8-ddefault_collation= Utf8_general_ci-dwith_extra_charsets:string=all-dwith_debug=0-denabled_local_infile=1
-- running cmake version 2.8.12.2-- could not find git (Missing: git_executable)-- the c compiler identification is unknown-- the cxx compiler identification is unknowncmake 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. cmake error at cmake/os/linux.cmake:27 (STRING): string sub-command Replace requires at least four arguments. call stack (Most recent call first): &Nbsp; cmakelists.txt:149 (INCLUDE) cmake error at cmake/os/linux.cmake:27 (STRING) : string sub-command replace requires at least four arguments. call stack (Most recent call first): cmakelists.txt:149 (INCLUDE)-- mysql 5.6.27-- packaging as: mysql-5.6.27-linux-i686-- could not find Threads (Missing: threads_found)-- could not find threads ( Missing: threads_found)-- check if the system is big endian-- searching 16 bit integercmake error at /usr/share/cmake/modules/ testbigendian.cmake:44 (message): no suitable type foundcall stack ( Most recent call first): configure.cmake:628 (TEST_BIG_ENDIAN) cmakelists.txt:398 (INCLUDE)--&NBsp configuring incomplete, errors occurred! see also "/usr/local/src/mysql-5.6.27/cmakefiles/cmakeoutput.log". see also "/usr/local/src/mysql-5.6.27/cmakefiles/cmakeerror.log".
Analysis:
--Could not find Git (missing:git_executable) This should be a lack of git package, yum install-y git
--The C compiler identification is unknown
--The CXX compiler identification is unknown these two missing gcc and gcc-c++ packages, yum install-y gcc gcc-c++
RM CMakeCache.txt also required
Go on
CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/mysql/data-ddefault_charset=utf8-ddefault_collation= Utf8_general_ci-dwith_extra_charsets:string=all-dwith_debug=0-dwith_ssl=yes-dwith_readline=1-denabled_local_ Infile=1
Error occurred:
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:openssl_include_dir used as include directory in directory /usr/local/src/mysql-5.6.27/cmakefiles/cmaketmpcmake error: internal cmake error, trycompile configure of cmake failed-- check size of wchar_t - failed-- check size of wctype_ Tcmake 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:openssl_include_dir used as include directory in directory /usr/local/src/mysql-5.6.27/cmakefiles/cmaketmpcmake error: internal cmake error, trycompile configure of cmake failed-- check size of wctype_t - failed-- Check size of wint_tCMake 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:openssl_include_dir used as include directory in directory /usr/local/src/mysql-5.6.27/cmakefiles/cmaketmpcmake error: internal cmake error, trycompile configure of cmake failed--& NBsP check size of wint_t - failed-- could not find curses ( Missing: curses_library curses_include_path) Cmake error at cmake/readline.cmake :85 (MESSAGE): curses library not found. please install Appropriate package, remove cmakecache.txt and rerun cmake. on debian/ubuntu, package name is libncurses5-dev, on redhat and Derivates it is ncurses-devel. call stack (Most recent call first): cmake/readline.cmake:128 (FIND_ CURSES) cmake/readline.cmake:202 (mysql_use_bundled_editline) cmakelists.txt:409 (Mysql_check_editline)-- configuring incomplete, errors occurred! see also "/usr/local/src/mysql-5.6.27/cmakefiles/cmakeoutput.log". see also " /usr/local/src/mysql-5.6.27/cmakefiles/cmakeerror.log ".
Analysis:
--Could not find Curses (missing:curses_library curses_include_path)
Missing Ncurses-devel package, yum install-y ncurses-devel
RM CMakeCache.txt
Remove Options-dwith_readline=1 and-dwith_ by reading the official document Http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html Ssl=yes
Re -
Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysql-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_extra_charsets:string=all-dwith_debug=0-denabled_local_infile=1
Warning appears:
-- running cmake version 2.8.12.2-- mysql 5.6.27-- packaging as: Mysql-5.6.27-linux-x86_64-- have_visibility_hidden-- have_visibility_hidden-- have_visibility_ Hidden-- using cmake version 2.8.12.2-- not building ndb-- library mysqlclient depends on oslibs -lpthread;m;rt;dlwarning: bison executable not found in path-- library mysqlserver depends on oslibs - Lpthread;m;rt;crypt;dl-- cmake_build_type: relwithdebinfo-- compile_definitions: have_ config_h-- cmake_c_flags: -wall -wextra -wformat-security -wvla - wwrite-strings -wdeclaration-after-statement-- cmake_cxx_flags: -wall -wextra - Wformat-security -wvla -woverloaded-virtual -wno-unused-parameter-- cmake_c_flags_ relwithdebinfo: -o3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -ddbug_off-- cmake_cxx_flags_ Relwithdebinfo: -o3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -ddbug_off-- configuring done-- generating done-- build files have been written to: /usr/local/src/mysql-5.6.27
Analysis: Warning:bison executable not found in PATH lacks Bison,yum install-y Bison
Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysql-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_extra_charsets:string=all-dwith_debug=0-denabled_local_infile=1
echo $? Yes, 0 means OK.
9.make && make Install
10.chown-r mysql:mysql/usr/local/mysql/
11.cd/usr/local/mysql/
/scripts/mysql_install_db.--user=mysql--datadir=/data/mysql Initialization
CP SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY.CNF
CP Support-files/mysql.server/etc/init.d/mysqld
chmod 755/etc/init.d/mysqld
16.vim/etc/init.d/mysqld modifying Datadir=/data/mysql
19.service mysqld Start
Successfully started starting MySQL. success!
This article is from the "Echo Xiayun" blog, so be sure to keep this source http://linuxerxy.blog.51cto.com/10707334/1728571
mysql-5.6.27 Source code installation and error resolution