cmake安装mysql出错 ---Configuring incomplete, errors occurred!

出错信息:

  include could not find load file:
  win/configure.data
  CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as
    cmake_minimum_required(VERSION 2.8)
  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
  This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/linux_php/mysql-5.0.41/CMakeFiles/CMakeOutput.log".
[root@localhost mysql-5.0.41]# 

centos时在配置php环境时,在安装到mysql时报错了,我可是一步步按照视频一步步做的啊,
好郁闷,最后我才发现,是不是因为版本不同呢?上网一搜,果然是:
mysql 5.5 才开始用cmake编译安装了,所以我是用错版本了

下载mysql5.5.15和cmake2.8.5
(参照博客:https://my.oschina.net/blueskyer/blog/136182)

网址 http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
网址 http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql5.5.15.tar.gz/from/http://mysql.stu.edu.tw/

【这个是二进制文件的安装包T T 这种方式的安装可以参考:CentOS下安装和使用mysql binary(二进制)文件安装 http://chinaestone.iteye.com/blog/732331

网址:http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.15-linux2.6-i686.tar.gz/from/http://mysql.stu.edu.tw/


- 安装cmake2.8.5

  • 安装mysql5.5.15


2、安装

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql

部分参数说明详见http://blog.samxy.com/archives/287.html
下面摘一点:

-DCMAKE_INSTALL_PREFIX= 数据库程序安装路径;
-DMYSQL_DATADIR= 数据库文件存放路径(不配置的话会默认创建$PREFIX_DIR/data)
-DMYSQL_UNIX_ADDR= 默认位置是/tmp/mysql.sock
-DDEFAULT_CHARSET= 默认数据库编码
-DDEFAULT_COLLATION= 默认数据库整理编码
-DWITH_EXTRA_CHARSETS= 扩展支持编码(all | utf8,gbk,gb2312 | none)
-DWITH_MYISAM_STORAGE_ENGINE= MYISAM引擎支持(1|0)
-DWITH_INNOBASE_STORAGE_ENGINE= innoDB引擎支持(1|0)
-DWITH_MEMORY_STORAGE_ENGINE= MEMORY引擎支持(1|0)

你可能感兴趣的:(linux)