溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

MySQL5.7.17源碼編譯安裝時(shí)的注意事項(xiàng)

發(fā)布時(shí)間:2020-08-10 16:33:47 來(lái)源:ITPUB博客 閱讀:164 作者:chenfeng 欄目:MySQL數(shù)據(jù)庫(kù)
MySQL5.7.17安裝略不同于MySQL5.6,需要指定boost,否則編譯安裝會(huì)報(bào)錯(cuò)
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

進(jìn)入boost_1_59_0目錄:
#cd /root/boost_1_59_0

然后是編譯安裝,直接執(zhí)行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


接下來(lái)就是編譯,重點(diǎn)關(guān)注是否編譯成功:
#./b2

然后就是漫長(zhǎng)的等待,直到最后出現(xiàn):


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


說(shuō)明編譯成功。


最后執(zhí)行:
./b2 install --prefix=/usr/local


接下來(lái)就可以編譯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問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI