Source code compilation mysql-5.7.11:http://cdn.mysql.com//downloads/mysql-5.7/mysql-5.7.11.tar.gzhttp:// liquidtelecom.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz installing the necessary resource bundles recommends using the network Yum Source, RHEL6.5 CD-ROM package version is not enough, mysql-5.7.11.tar.gz compilation of the package version of the requirements are relatively high, where CMake version is not less than 2.8 network Yum Source configuration can refer to HTTP://BLOG.SINA.COM.CN/S /blog_14e8c64ca0102vztv.html[[email protected] ~]# yum-y install gcc gcc-c++ autoconf automake zlib* libxml* ncurse S-devel libtool-ltdl-devel* make CMake delete system comes with mysql[[email protected] mysql-5.7.11]# yum-y remove MySQL Add users and Groups [[ Email protected] ~]# groupadd mysql[[email protected] ~]# useradd-m-s/sbin/nologin-r-g mysql MySQL create installation directory and According to the storage directory add a new hard disk, create partition SDB1 and allocate all the space [[email protected] ~]# mkdir/server[[email protected] ~]# mount/dev/sdb1/ server/boot automatically mount echo "/dev/sdb1/server ext4 defaults 0 0" >>/etc/ Fstab Note: mysql-5.7.11.tar.gz installation space is relatively large, the virtual machine environment is recommended to add a new hard disk to install, the real server does not need [[email protected] ~]# mkdir-p/server/ Mysql/data upload the source package to the/server directory or directly wget to download the source package decompression source Package [[Email protected] server]# tar zxf boost_1_59_0.tar.gz[[email protected] server]# tar zxf mysql-5.7.11.tar.gz Modify Boost Extract directory name [[email protected] server]# MV Boost_1_59_0 boost offload system comes with boost library [[email Protected] ~]# yum-y Remove boost-* Note: Source compilation from mysql5.7.5 after the Boost library is required configuration related parameters [[email protected] ~]# CD mysql-5.7.11[[ Email protected] mysql-5.7.11]# Cmake-dcmake_install_prefix=/server/mysql-dmysql_datadir=/server/mysql/data -dsysconfdir=/etc-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=1-dwith_memory_storage_engine=1- Dwith_readline=1-dmysql_unix_addr=/server/mysql/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- Ddownload_boost=1-dwith_boost=/server/boost compiled parameters can be referenced in http://dev.mysql.com/doc/refman/5.6/en/ Source-configuration-options.html Cmake_install_prefix: Specifies the installation directory of the MySQL program, default/usr/local/mysqldefault_ CHARSET: Specifies the server default character set, default Latin1defaulT_collation: Specifies the default proofing rules for the server, default Latin1_general_cienabled_local_infile: Specifies whether to allow load DATA INFILE to be executed locally, by default Offwith_ COMMENT: Specifies compile note Information with_xxx_storage_engine: Specifies the storage engine that is statically compiled to MySQL, Myisam,merge,member and CSV Four engines are compiled to the server by default and do not require special designation. Without_xxx_storage_engine: Specify a storage engine that does not compile Sysconfdir: Initialize parameter file directory mysql_datadir: Data file directory mysql_tcp_port: Service port number, default 3306mysql_ Unix_addr:socket file path, the default/tmp/mysql.sock compilation mysql-5.7.11.tar.gz compile time consumes a lot of system resources, it is recommended to use more than one core to compile at the same time, or it may fail to compile [[email Protected] mysql-5.7.11]# make-j 4 View server CPU cores [[email protected] ~]# grep processor/proc/cpuinfo | WC-L4 install [[email protected] mysql-5.7.11]# make install modify directory permissions [[email protected] ~]# chown-r mysql:mysql/ Server/mysql generate configuration file [[email protected] ~]# mv/etc/my.cnf{,.bak}[[email protected] ~]# cp/server/mysql/ SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY.CNF Build Service startup script [[email protected] ~]# cp/server/mysql/support-files/ Mysql.server/etc/init.d/mysqld[[email protected] ~]# chmod 755/etc/init.d/mysqld[[email protected] ~]# Chkconfig--addMysqld[[email protected] ~]# chkconfig mysqld on[[email protected] ~]# chkconfig--list mysqldmysqld 0:off 1:o FF 2:on 3:on 4:on 5:on 6:off Initialize database [[email protected] ~]#/server/mysql/bin/mysqld--initialize-insecure--user= MySQL--basedir=/server/mysql--datadir=/server/mysql/data start service [[email protected] ~]# service mysqld Startstarting MySQL [OK] Add path Path: Vim/etc/profile Add the following 2 lines at the end of the file export Mysql_home=/server/mysqlexport path= $PATH: $MYSQ L_home/bin Modify the mysql password [[email protected] ~]# mysqlmysql> set Password=password (' 123456 ');
RHEL6.5 Source Installation mysql-5.7.11