Source Code Compilation Installation MySQL-5.5
Need to prepare cmake-2.8.8.tar.gz and mysql-5.5.25a.tar.gz two packs into linux/usr/local/src in advance
One of the important characteristics of CMake is its independent source code (OUT-OF-SOURCE) of the compilation function, that is, the compilation can be done in another specified directory rather than in the source directory, which ensures that the source directory is not affected by any compilation, so multiple compilations can be made on the same source tree. If compiled for different platforms.
I. Installation of CMake
Cross-platform compilers
[Root@localhost src]# Tar xf cmake-2.8.8.tar.gz
[root@localhost src]# cd cmake-2.8.8
[root@localhost cmake-2.8.8]#./bootstrap
[root@localhost cmake-2.8.8]# make && make install
Ii. Compiling and installing mysql-5.5.25a
1. Compile mysql-5.5 with CMake
CMAKE specifies compilation options differently than make, which is implemented in a way that compares the following:
./configure CMake.
./configure--help CMake. -lh or Ccmake.
The options that are commonly used when specifying the installation path for installation files:
-dcmake_install_prefix=/usr/local/mysql
-dmysql_datadir=/data/mysql
-dsysconfdir=/etc
The default compiled storage engines include: CSV, MyISAM, MYISAMMRG, and heap. To install additional storage engines, you can use a compilation option similar to the following:
-dwith_innobase_storage_engine=1
-dwith_archive_storage_engine=1
-dwith_blackhole_storage_engine=1
-dwith_federated_storage_engine=1
To explicitly specify that a storage engine is not compiled, you can use an option similar to the following:
-dwithout_<engine>_storage_engine=1
Like what:
-dwithout_example_storage_engine=1
-dwithout_federated_storage_engine=1
-dwithout_partition_storage_engine=1