Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
MySQL版本:mysql-5.6.26
系统:Centos 6.5 x64
解决办法:安装ncurses即可
Centos下用yum安装如下:yum install ncurses-devel
CMake编译MySQL常用命令如下:
参数值说明 | 配置选项 | CMak选项 |
安装根目录 | --prefix=/usr | -DCMAKE_INSTALL_PREFIX=/usr |
mysqld目录 | --libexecdir=/usr/sbin | -DINSTALL_SBINDIR=sbin |
数据存储目录 | --localstatedir=/var/lib/mysql | -DMYSQL_DATADIR=/var/lib/mysql |
配置文件(my.cnf)目录 | --sysconfdir=/etc/mysql | -DSYSCONFDIR=/etc/mysql |
插件目录 | --with-plugindir=/usr/lib64/mysql/plugin | -DINSTALL_PLUGINDIR=lib64/mysql/plugin |
手册文件目录 | --mandir=/usr/share/man | -DINSTALL_MANDIR=share/man |
共享数据目录 | --sharedstatedir=/usr/share/mysql | -DINSTALL_SHAREDIR=share |
Library库目录 | --libdir=/usr/lib64/mysql | -DINSTALL_LIBDIR=lib64/mysql |
Header安装目录 | --includedir=/usr/include/mysql | -DINSTALL_INCLUDEDIR=include/mysql |
信息文档目录 | --infodir=/usr/share/info | -DINSTALL_INFODIR=share/info |
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake . (根据实际需要添加参数,上面的表格提供了部分常用参数。)
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysqld
以后启动就可以:service mysqld (start|stop|restart)
(责任编辑:安博涛)