Bootstrap

centos7下源码安装mysql8

1.安装编译工具及库文件

yum -y install gcc gcc-c++ make autoconf libtool-ltdl-devel gd-devel freetype-devel libxml2-devel libjpeg-devel libpng-devel openssl-devel curl-devel bison patch unzip libmcrypt-devel libmhash-devel ncurses-devel sudo bzip2 flex libaio-devel

2. 安装cmake 编译器

  1. 要求cmake3以上版本,下载地址http://www.cmake.org/files/v3.23/cmake-3.23.0.tar.gz
wget http://www.cmake.org/files/v3.23/cmake-3.23.0.tar.gz
  1. 解压安装包,并进入目录
tar zxvf cmake-3.23.0.tar.gz
cd cmake-3.23.0
  1. 编译安装
./bootstrap
make && make install

3. 安装 MySQL

  1. 下载mysql源码,带boost版本,如果下载不带boost的版本需要自己安装boost。下载地址https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.29.tar.gz
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.29.tar.gz
  1. 解压安装包并进入目录
tar zxvf mysql-boost-8.0.29.tar.gz
cd mysql-8.0.29
;