由于mysql从5.5之后的版本源码编译安装用cmake, make, make install安装,不用./Configure,make,make install 安装,所以要看下系统是不是有cmake这个命令,红帽企业版5默认是没有安装的,所以要手动安装(红帽6已默认安装)。cmake安装方法在网上搜下就行。
安装Mysql官方给的方法如下:
# 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/mysql.server