[iyunv@localhost ~]# cd /usr/local/src/
[iyunv@localhost src]# tar xzvf cmake-2.8.4.tar.gz
[iyunv@localhost src]# cd cmake-2.8.4
[iyunv@localhost cmake-2.8.4]# ./bootstrap
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/local/src/cmake-2.8.4/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
报错:缺少C的编译器。
安装gcc编译器
可以从Linux系统的安装盘中安装,也可以简单地用yum安装
[iyunv@localhost ~]# yum install gcc
继续cmake的安装
[iyunv@localhost cmake-2.8.4]# ./bootstrap
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: cc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/local/src/cmake-2.8.4/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
再次报错:缺少C++编译器。
[iyunv@localhost ~]# groupadd mysql
[iyunv@localhost ~]# useradd -g mysql mysql
下载mysql的源码包mysql-5.5.11.tar.gz到/usr/local/src下,解压
[iyunv@localhost ~]# cd /usr/local/src/
[iyunv@localhost src]# tar xzvf mysql-5.5.11.tar.gz
[iyunv@localhost src]# cd mysql-5.5.11
cmake运行
[iyunv@localhost mysql-5.5.11]# cmake .
报错:
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:82 (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:126 (FIND_CURSES)
cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:250 (MYSQL_CHECK_READLINE)
-- Configuring incomplete, errors occurred!
缺少Curses包,解决办法:
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev,
on Redhat and derivates it is ncurses-devel.很容易看懂,不解释了...
[iyunv@localhost ~]# mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd')
使用mysqladmin命令行程序