码迷,mamicode.com
首页 > 数据库 > 详细

手把手教你编译安装MariaDB

时间:2016-11-26 09:33:25      阅读:303      评论:0      收藏:0      [点我收藏+]

标签:sql   with   href   int   home   gen   fail   cli   acl   

MariaDB是什么?

MariaDB是MySQL的一个分支,由于Oracle有可能对MySQL闭源,所以分离了出来(MySQL先后被Sun、Oracle收购)。

但是除了作为一个Mysql的“向下替代品”,MariaDB包括的一些新特性使它优于MySQL。

官网说明

The instructions on this page will help you compile MariaDB from source. Links to more complete instructions for specific platforms can be found on the source page.

First, get a copy of the MariaDB source.

Next, prepare your system to be able to compile the source.

If you don‘t want to run MariaDB as yourself, then you should create amysql user. The example below uses this user.

Using cmake (MariaDB starting with 5.5)

MariaDB 5.5 and above is compiled using cmake. You can configure your build simply by running cmake without any special options, like

cmake .

but if you want it to be configured exactly as we do for our releases, use

cmake . -DBUILD_CONFIG=mysql_release

All cmake configuration options for MariaDB can be displayed with:

cmake . -LH

To build and install MariaDB after running cmake use

make
sudo make install

If the commands above fail, you can enable more compilation information by doing:

make VERBOSE=1

以上摘自:https://mariadb.com/kb/en/mariadb/generic-build-instructions/

cmake的选项和mysql的cmake相似,可供参考(中文文档):http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html

测试实践

编译实践

#解压

tar xfz mariadb-10.0.16.tar.gz

  #进入安装目录

cd mariadb

 #配置 

cmake . -DCMAKE_INSTALL_PREFIX=/opt/waTeam/mariadb -DMYSQL_DATADIR=/home/datas/mariadb/data/ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

 
#编译 约半小时时间

make

 #安装

 
make install
 至此,MariaDB编译安装完成。

手把手教你编译安装MariaDB

标签:sql   with   href   int   home   gen   fail   cli   acl   

原文地址:http://www.cnblogs.com/congli1985/p/6103540.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!