2016-03-28
已经yum最新补丁,以kernel包为例
点击(此处)折叠或打开
-
[root@192 ~]# rpm -q kernel
-
kernel-2.6.18-409.el5
-
[root@192 ~]#
- [root@192 ~]# yum install cmake rpm-build
点击(此处)折叠或打开
- http://dev.mysql.com/doc/refman/5.7/en/source-installation.html
下载最新的mysql代码包
点击(此处)折叠或打开
- wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-5.7.11-1.el5.src.rpm
然后进入rpm帮助步骤
点击(此处)折叠或打开
- http://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
一些步骤遇到的问题
点击(此处)折叠或打开
-
[root@192 ~]# rpmbuild --rebuild --clean mysql-community-5.7.11-1.el5.src.rpm
-
Installing mysql-community-5.7.11-1.el5.src.rpm
-
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 5072e1f5
-
error: Failed build dependencies:
-
libaio-devel is needed by mysql-community-5.7.11-1.i386
-
ncurses-devel is needed by mysql-community-5.7.11-1.i386
-
openssl-devel is needed by mysql-community-5.7.11-1.i386
-
zlib-devel is needed by mysql-community-5.7.11-1.i386
- [root@192 ~]#
自己再yum install一下,rpm目前有问题,请走tar路线
系统自带的cmake版本太低了,需要手动下载(最新版本)
点击(此处)折叠或打开
- wget https://cmake.org/files/v3.5/cmake-3.5.1.tar.gz --no-check-certificate
- yum remove cmake -y
-
yum install gcc gcc-c++
解压tar xf 然后安装
点击(此处)折叠或打开
- [root@192 cmake-3.5.1]# ./bootstrap && make && make install
...
GCC 4.4 or newer is required!
[root@192 mysql-5.7.11]# gcc -v
使用内建 specs。
目标:i386-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
线程模型:posix
gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-55)
[root@192 mysql-5.7.11]#
[root@192 mysql-5.7.11]#
==============
建议换到centos6,这样自己动手处理的东西要少点
yum update -y
点击(此处)折叠或打开
- yum install wget gcc gcc-c++ cmake ncurses-devel
主要步骤在这里
点击(此处)折叠或打开
- http://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
自己编译安装
点击(此处)折叠或打开
-
cmake . -DWITH_BOOST=boost
- rm CMakeCache.txt //如果cmake中途失败,用这里命令
-
make install