MySQL为开源数据库,因此能够基于源代码实现安装。基于源代码安装有很多其它的灵活性。
也就是说我们能够针对自己的硬件平台选用合适的编译器来优化编译后的二进制代码。依据不同的软件平台环境调整相关的编译參数。选择自身须要选择不同的安装组件,设定须要的字符集等等一些能够依据特定应用场景所作的各种调整。本文描写叙述了怎样在源代码方式下安装MySQL。
1、安装环境及介质#安装环境SZDB:~ # cat /etc/issueWelcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l).
SZDB:~ # uname -aLinux SZDB 2.6.16.60-0.54.5-smp #1 SMP Fri Sep 4 01:28:03 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
#安装介质。能够到以下网址下载安装介质。注意下载时选择source code。当前版本号为5.6.17
#依据你自身的环境下载相应的安装介质,本文演示的安装介质为Generic Linux (Architecture Independent), mysql-5.6.17.tar.gzhttp://dev.mysql.com/downloads/mysql/
2、系统需求Source Installation System Requirements
Installation of MySQL from source requires several development tools. Some of these tools are needed no matter whether you use a standard source distribution or a development source tree. Other tool requirements depend on which installation method you use.
To install MySQL from source, your system must have the following tools, regardless of installation method:CMake, which is used as the build framework on all platforms. CMake can be downloaded fromhttp://www.cmake.org.
A good make program. Although some platforms come with their own make implementations, it is highly recommended that you use GNU make 3.75 or newer. It may already be available on your system as gmake. GNU make is available fromhttp://www.gnu.org/software/make/.
A working ANSI C++ compiler. GCC 4.2.1 or later, Sun Studio 12 or later, Visual