温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

MySQL5.7.17源码编译安装时的注意事项

发布时间:2020-08-10 16:33:47 来源:ITPUB博客 阅读:165 作者:chenfeng 栏目:MySQL数据库
MySQL5.7.17安装略不同于MySQL5.6,需要指定boost,否则编译安装会报错
boost下载地址:
下载:
#wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz

解压:
# cd /root
#tar xvzf boost_1_59_0.tar.gz

进入boost_1_59_0目录:
#cd /root/boost_1_59_0

然后是编译安装,直接执行bootstrap.sh就可以:

#sh ./bootstrap.sh

Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
Detecting Python version... 2.6
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam...

Bootstrapping is done. To build, run:

    ./b2
    
To adjust configuration, edit ‘project-config.jam‘.
Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - Boost.Build documentation:
     http://www.boost.org/boost-build2/doc/html/index.html


接下来就是编译,重点关注是否编译成功:
#./b2

然后就是漫长的等待,直到最后出现:


The Boost C++ Libraries were successfully built!


The following directory should be added to compiler include paths:


    /root/boost_1_59_0


The following directory should be added to linker library paths:


    /root/boost_1_59_0/stage/lib


说明编译成功。


最后执行:
./b2 install --prefix=/usr/local


接下来就可以编译MySQL5.7了,需要用-DWITH_BOOST=/root/boost_1_59_0指定boost的目录:
#cmake .  -DCMAKE_INSTALL_PREFIX=/opt/mysql -DWITH_DEBUG=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/root/boost_1_59_0
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI