赞
踩
安装依赖包yum -y install gcc gcc-c++ ncurses ncurses-devel cmake
下载相应源码包cd /root/oneinstack/src
wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
wget http://cdn.mysql.com/Downloads/MySQL-5.7/mysql-5.7.11.tar.gz
添加mysql用户useradd -M -s /sbin/nologin mysql
预编译tar xzf boost_1_59_0.tar.gz
tar xzf mysql-5.7.11.tar.gz
mkdir -p /data/mysql
cd mysql-5.7.11
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/data/mysql \
-DDOWNLOAD_BOOST=1 \ #从MySQL 5.7.5开始Boost库是必需的
-DWITH_BOOST=../boost_1_59_0 \
-DSYSCONFDIR=/etc \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DENABLE_DTRACE=0 \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DWITH_EMBEDDED_SERVER=1
cmake . -DCMAKE_INSTALL_PREFIX=/srv/mysql5713 \
-DMYSQL_DATADIR=/srv/mysql5713/data \
-DMYSQL_UNIX_ADDR=/srv/mysql5713/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATER_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_EXAMPLE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FAST_MUTEXES=1
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。