程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> 手把手教你編譯安裝MariaDB,手把手編譯mariadb

手把手教你編譯安裝MariaDB,手把手編譯mariadb

編輯:MySQL綜合教程

手把手教你編譯安裝MariaDB,手把手編譯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編譯安裝完成。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved