2015-05-05 17:07:32 -04:00
---
layout: doc_page
---
### Build from Source
2016-01-06 00:27:52 -05:00
You can build Druid directly from source. Please note that these instructions are for building the latest stable of Druid.
2018-08-30 12:56:26 -04:00
For building the latest code in master, follow the instructions [here ](https://github.com/apache/incubator-druid/blob/master/docs/content/development/build.md ).
2015-05-05 17:07:32 -04:00
2018-09-25 13:05:26 -04:00
#### Prerequisites
##### Installing Java and Maven:
2018-07-26 20:05:07 -04:00
- [JDK 8 ](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html )
2015-05-05 17:07:32 -04:00
- [Maven version 3.x ](http://maven.apache.org/download.cgi )
2018-09-25 13:05:26 -04:00
##### Downloading the source:
2015-05-05 17:07:32 -04:00
2018-09-25 13:05:26 -04:00
```bash
2018-08-30 12:56:26 -04:00
git clone git@github.com:apache/incubator-druid.git
2015-05-05 17:07:32 -04:00
cd druid
```
2015-07-07 23:51:44 -04:00
2018-09-25 13:05:26 -04:00
#### Building the source
##### Building the Druid binary distribution tarball:
```bash
mvn clean install -Pdist -Dtar -DskipTests
```
Once it succeeds, you can find the Druid binary (`druid-VERSION-bin.tar.gz`)
and `mysql-metadata-storage` extension under `${DRUID_ROOT}/distribution/target/` .
If you want Druid to load `mysql-metadata-storage` , you can
2016-01-06 00:27:52 -05:00
first untar `druid-VERSION-bin.tar.gz` , then go to ```druid-< version > /extensions```, untar `mysql-metadata-storage-bin.tar.gz`
there. Now just specifiy `mysql-metadata-storage` in `druid.extensions.loadList` so that Druid will pick it up.
See [Including Extensions ](../operations/including-extensions.html ) for more information.
2018-09-25 13:05:26 -04:00
##### Building the source code only:
```bash
mvn clean install -DskipTests
```