手把手教你编译安装MariaDB

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编译安装完成。

转载于:https://www.cnblogs.com/congli1985/p/6103540.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值