这是我在CentOS6.2下安装mysql-5.1.60时做的记录
1、下载并解压安装包
tar zxvf mysql-5.1.60.tar.gz
2、配置configure
如果需安装innodb的,编译命令如下
./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=innobase
如果不需要安装innodb的,编译命令如下./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile
我在编译需innodb的时候遇到error:No curses/termcap library found的问题,原因是缺少ncurses安装包,解决办法如下:
如果你的系统是RedHat系列:
yum list|grep ncurses
yum -y install ncurses-devel
如果你的系统是Ubuntu或Debian:apt-cache search ncurses
apt-get install libncurses5-dev
3、编译并安装
make && make install