日期:2014-05-16  浏览次数:21094 次

ubuntu下mysql源码安装

安装所需的编译工具

apt-get install autoconf automake autotools-dev cpp curl gawk gcc lftp libc6-dev linux-libc-dev make libpcre3-dev libpcrecpp0 g++ libtool libncurses5-dev aptitude python python-dev


aptitude install libmysql++-dev libmysqlclient15-dev checkinstall


?

1 , 安装所需要系统库相关库文件
yum –y install gcc gcc- c++ ?gcc- g77 autoconf automake zlib* ?fiex* ?libxml*
ncurses- devel libmcrypt* ?libtool- ltdl- devel*

?

2 , 创建mysql安装目录
# mkdir -p /usr/local/webserver/mysql/

?

3 , 创建数据存放目录
# mkdir -p /data/mysql/

?

4 , 创建用户和用户组与赋予数据存放目录权限
# groupadd mysql
# useradd -g mysql mysql
# chown mysql.mysql -R /data/mysql/

?

5 , 安装cmake(mysql5.5以后是通过cmake来编译的)
# wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
# tar zxvf cmake-2.8.4.tar.gz
# cd cmake-2.8.4
#.configure
# make && make install


6 , 下载解压mysql 5.5.11
wget http: //mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.11.tar.gz
[ root@localhost down] # tar zxvf mysql-5.5.11.tar.gz
[ root@localhost down] # cd mysql-5.5.11

?

7