要在centos上安裝mysql,這些知識還不是很瞭解,找了一些資料分享一下
1、下載mysql-5.5.3-m3.tar.gz,並且解壓.
tar -xzvf mysql-5.1.36.tar.gz
2、添加mysql組,新建mysql用戶
groupadd mysql
useradd -g mysql mysql
3、進入目錄
cd mysql-5.5.3-m3/
4、配置
./configure --prefix=/usr/local/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg
注:我在這裏出現了錯誤:
configure.am: error: in `/usr/local/soft/mysql-5.5.3-m3':
configure.am: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
解決:
因爲是centos linux,默認可以採用yum方式安裝,則採用如下命令安裝gcc編譯器即可:
# yum -y install gcc
安裝mysql時No curses/termcap library found
checking for termcap functions library... configure: error: No curses/termcap library found
解決:
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure –prefix=/usr –with-shared –without-debug
make
make install clean