您的位置
主页 > 网站技术 > 数据库 > » 正文

SUSE Linux下源码编译方式安装MySQL 5.6过程分享

来源: 锦尚中国 点击:

MySQL为开源数据库,因此可以基于源码实现安装。基于源码安装有更多的灵活性。也就是说我们可以针对自己的硬件平台选用合适的编译器来优化编译后的二进制代码,根据不同的软件平台环境调整相关的编译参数,选择自身需要选择不同的安装组件,设定需要的字符集等等一些可以根据特定应用场景所作的各种调整。本文描述了如何在源码方式下安装MySQL。

1、安装环境及介质

复制代码 代码如下:


#安装环境
SZDB:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l).
SZDB:~ # uname -a
Linux 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.gz

#源码安装方式官方网站链接:

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 from
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 from
A working ANSI C++ compiler. GCC 4.2.1 or later, Sun Studio 12 or later, Visual Studio 2010 or later, and many current vendor-supplied compilers are known to work.
Perl is needed if you intend to run test scripts. Most Unix-like systems include Perl. On Windows, you can use a version such as ActiveState Perl.
#使用源码安装上面的一些开发工具是需要的,比较重要的一个是Cmake工具,通常情况下os并没有安装,需要手动安装。
#如果没有cmake会收到这个错误提示:(-bash: cmake: command not found)

3、安装cmake

复制代码 代码如下:




首页  - 关于站长圈  - 广告服务  - 联系我们  - 关于站长圈  - 网站地图  - 版权声明