# Local

## Outcome

Start a multi-component Pinot cluster directly on your machine without containers.

## Prerequisites

* JDK 11 or 21 (JDK 17 should work but is not officially supported)
* Apache Maven 3.6+ (only if building from source)

## Steps

### 1. Download or build Apache Pinot

{% tabs %}
{% tab title="Download release" %}

```bash
export PINOT_VERSION=1.4.0

wget https://downloads.apache.org/pinot/apache-pinot-${PINOT_VERSION}/apache-pinot-${PINOT_VERSION}-bin.tar.gz
```

See the [Version reference](https://docs.pinot.apache.org/start-here/pinot-versions) page for the current stable release.

Extract and enter the directory:

```bash
tar -zxvf apache-pinot-${PINOT_VERSION}-bin.tar.gz
cd apache-pinot-${PINOT_VERSION}-bin
```

{% endtab %}

{% tab title="Build from source" %}
{% hint style="info" %}
**Prerequisite:** Install [Apache Maven](https://maven.apache.org/install.html) 3.6 or higher.
{% endhint %}

```bash
git clone https://github.com/apache/pinot.git
cd pinot
mvn install package -DskipTests -Pbin-dist
cd build
```

{% endtab %}

{% tab title="Homebrew" %}

```bash
brew install pinot
```

{% endtab %}
{% endtabs %}

### 2. Start ZooKeeper

```bash
./bin/pinot-admin.sh StartZookeeper \
  -zkPort 2181
```

### 3. Start Pinot Controller

```bash
export JAVA_OPTS="-Xms4G -Xmx8G"
./bin/pinot-admin.sh StartController \
    -zkAddress localhost:2181 \
    -controllerPort 9000
```

### 4. Start Pinot Broker

```bash
export JAVA_OPTS="-Xms4G -Xmx4G"
./bin/pinot-admin.sh StartBroker \
    -zkAddress localhost:2181
```

### 5. Start Pinot Server

```bash
export JAVA_OPTS="-Xms4G -Xmx16G"
./bin/pinot-admin.sh StartServer \
    -zkAddress localhost:2181
```

### 6. Start Pinot Minion (optional)

```bash
export JAVA_OPTS="-Xms4G -Xmx4G"
./bin/pinot-admin.sh StartMinion \
    -zkAddress localhost:2181
```

### 7. Start Kafka (optional)

Only needed if you plan to ingest real-time streaming data.

```bash
./bin/pinot-admin.sh StartKafka \
  -zkAddress=localhost:2181/kafka \
  -port 19092
```

## Verify

Check that the Controller is healthy:

```bash
curl localhost:9000/health
```

The response should return `OK`. You can also open the Pinot Query Console at <http://localhost:9000>.

## Next step

Your cluster is running. Continue to [First table and schema](https://docs.pinot.apache.org/start-here/first-table-and-schema) to load data.
