yum -y install ncurses-devel libaio-devel
2、下载cmake包,解压,编译
wget -q https://cmake.org/files/v2.8/cmake-2.8.8.tar.gz tar -xvf cmake-2.8.8.tar.gz cd cmake-2.8.8 ./configure
编译报错一般是因为没有安装gcc-c++
yum -y install gcc-c++
gmake && gmake install
3、下载mysql-5.5.58.tar.gz
tar -xvf mysql-5.5.58.tar.gz cd mysql-5.5.58
cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.58 -DMYSQL_DATADIR=/application/mysql-5.5.58/data -DMYSQL_UNIX_ADDR=/application/mysql-5.5.58/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARESTS=gbk,gb2313,utf8,ascii -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_PARTITION_STORAGE_ENGINE=1 -DWITH_FAST_MUTEXES=1 -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 -DWITH_READLINE=1 -DWTH_EMBEDDED_SERVER=1 -DWITH_DEBUG=0
make && make install
原文地址:http://blog.51cto.com/jhyeliu/2052068