在之前的实战课程中,一直没有包括MySQL编译安装的内容,因此在这里来说一下,如何编译安装MySQL8.0。话不多说,步骤如下:
[root@localhost tools]# wget –no-check-certificate https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.11.tar.gz wget
1)cmake
2) make >=3.75
3) gcc >=4.8
4) bison >=2.1
5) ncurses
系统:Cenots7
yum groupinstall “Development tools”
yum install -y ncurses ncurses-devel cmake3 bison bison-devel openssl openssl-libs openssl-devel
cmake . \
-DSYSCONFDIR:PATH=/home/smysql8011 \
-DCMAKE_INSTALL_PREFIX:PATH=/home/smysql8011 \
-DENABLED_PROFILING:BOOL=ON \
-DENABLE_DEBUG_SYNC:BOOL=OFF \
-DMYSQL_MAINTAINER_MODE:BOOL=OFF \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \
-DWITH_EXTRA_CHARSETS:STRING=all \
-DWITH_BIG_TABLES:BOOL=ON \
-DWITH_FAST_MUTEXES:BOOL=ON \
-DENABLE-PROFILING:BOOL=ON \
-DZLIB_INCLUDE_DIR=/usr/lib64 \
-DWITH_SSL:STRING=bundled \
-DWITH_UNIT_TESTS:BOOL=OFF \
-DWITH_ZLIB:STRING=bundled \
-DWITH_PARTITION_STORAGE_ENGINE:BOOL=ON \
-DWITH_PLUGINS=heap,csv,partition,innodb,myisam,archive \
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=ALL \
-DENABLED_ASSEMBLER:BOOL=ON \
-DENABLED_LOCAL_INFILE:BOOL=ON \
-DENABLED_THREAD_SAFE_CLIENT:BOOL=ON \
-DENABLED_EMBEDDED_SERVER:BOOL=OFF \
-DWITH_INNODB_MEMCACHED=0 \
-DENABLE_MEMCACHED_SASL=0 \
-DENABLE_MEMCACHED_SASL_PWDB=0 \
-DWITH_BOOST=/home/tools/boost \
-DCOMMUNITY_BUILD:BOOL=ON
make install
bin/mysqld –initialize-insecure –basedir=/home/mysql –datadir=/home/mysql/data