1.安装cmake
MySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具。
因此,我们首先要在系统中源码编译安装cmake工具。
# wget http://www.doczj.com/doc/e83fe02b7375a417866f8f0a.html/files/v2.8/cmake-2.8.7.tar.gz
# tar zxvf cmake-2.8.7.tar.gz
# cd cmake-2.8.7
# ./configure
# make
# make install
2.安装ncurses
wget http://www.doczj.com/doc/e83fe02b7375a417866f8f0a.html.tw/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
sudo ./configure --prefix=/usr --with-shared --without-debug
sudo make && sudo make install clean
3.安装mysql
# # # 新建运行MySQL的用户
groupadd mysql
useradd -g mysql mysql
cp mysql-5.5.20.tar.gz /home/mysql/
chown -R mysql:mysql /home/mysql/mysql-5.5.20.tar.gz