本文實例為大家分享了Linux mysql5.7.13安裝教程,供大家參考,具體內容如下
1、準備
cmake-3.6.0.tar.gz
bison-3.0.4.tar.gz
mysql-5.7.13.tar.gz (http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13.tar.gz)
2、安裝cmake 和 bison
首先可以檢查下方是否安裝了 cmake
# rpm -qa |grep cmake # tar zxvf cmake-3.6.0.tar.gz # cd cmake-3.6.0 # ./bootstrap # make && make install # tar zxvf bison-3.0.4.tar.gz # cd bison-3.0.4 # ./configure # make && make install
3、安裝Mysql
[root@localhost src]# tar -zxvf mysql-5.7.13.tar.gz [root@localhost src]# cd mysql-5.7.13 [root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 ... CMake Error at cmake/boost.cmake:81 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory> This CMake script will look for boost in <directory>. If it is not there, it will download and unpack it (in that directory) for you. If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://example.com:80 Call Stack (most recent call first): cmake/boost.cmake:238 (COULD_NOT_FIND_BOOST) CMakeLists.txt:451 (INCLUDE) -- Configuring incomplete, errors occurred!
程式碼如下:
[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=mysql.myd -DDEFAULT_CHAR_bx -DMYSQL_UNIX_ADDR=mysql。 ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost
[root@localhost mysql-5.7.13]# make[root@localhost mysql-5.7.13]# make install
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持。