The system platform for this tutorial: CentOS release 6.6 (Final) 64-bit.
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
cmake version: cmake-3.1.1.
1. Download address:
$ wget http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gzmysql1
2. Unzip the installation package
$ tar zxvf cmake-3.1.1.tar.gz
3. Enter the installation package Directory
$ cd cmake-3.1.1
4. Compile and install
$ ./bootstrap $ make && make install
MySQL version: mysql-5.6.15.
1. Download address:
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.15.tar.gzmysql2
2. Unzip the installation package
$ tar zxvf mysql-5.6.15.tar.gz
3. Enter the installation package Directory
$ cd mysql-5.6.15
4. Compile and install
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql/ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_INNODB_MEMCACHED=1 -DWITH_DEBUG=OFF -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 -DENABLED_PROFILING=ON -DMYSQL_MAINTAINER_MODE=OFF -DMYSQL_DATADIR=/usr/local/webserver/mysql/data -DMYSQL_TCP_PORT=3306 $ make && make install
5. Check the mysql version:
$ /usr/local/webserver/mysql/bin/mysql --versionmysql3
This is it. mysql installation is complete.
The above is the detailed content of What is the command to install MySQL under Linux?. For more information, please follow other related articles on the PHP Chinese website!