#下载依赖yum install -y ncurses ncurses-devel cmake bison bison-devel openssl openssl-libs openssl-devel gcc gcc-c++ gcc-g77 make #创建mysql账号与存储目录useradd -s /sbin/nologin -M mysqlmkdir /data/mysqldata -pchown -R mysql.mysql /data/mysqldata#安装boost wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gztar xf boost_1_60_0.tar.gz -C /usr/local/mv /usr/local/boost_1_60_0 /usr/local/boost#下载mysql与安装mysqlwget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.11.tar.gztar xf mysql-boost-8.0.0-dmr.tar.gz cd mysql-8.0.0-dmr/cmake \-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \-DMYSQL_DATADIR=/data/mysqldata/data \-DSYSCONFDIR=/etc \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DMYSQL_UNIX_ADDR=/data/mysqldata/mysql.sock \-DMYSQL_TCP_PORT=3306 \-DENABLED_LOCAL_INFILE=1 \-DWITH_PARTITION_STORAGE_ENGINE=1 \-DEXTRA_CHARSETS=all \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DWITH_BOOST=/usr/local/boostmake && make install