This is a prerelease version.

Install Hazelcast

You can install Hazelcast in many ways, including from a package manager, a binary, a Docker image, or embedding it in your Java projects.

Choosing a Distribution

Hazelcast is available in two distributions:

  • Full: Includes Management Center and all connectors for distributed processing

  • Slim: Excludes Management Center and connectors

These getting started tutorials use the full distribution to walk you through important features.

If you later decide that you do not need these features, you can use the slim version to save memory.

Choosing an Application Topology

You can use Hazelcast in two topologies, depending on where you want the Hazelcast servers (members) to run:

  • Client/server mode: Hazelcast members run remotely outside of your application, allowing you to scale them independently and connect to them through any of the supported clients.

  • Embedded mode: Hazelcast members run in the same Java process as your application.

For details about these topologies, see Hazelcast Topologies.

To get started with client/server mode, install Hazelcast with a package manager, Docker, or from binary.

To get started with embedded mode, install Hazelcast in your Java project.

Using a Package Manager

  1. To install the Hazelcast CLI, use one of the following package managers depending on your operating system:

    • Mac

    • Linux

    • Windows

    To install the CLI on macOS, use the Homebrew package manager.

    brew tap hazelcast/hz
    brew install hazelcast

    To install the CLI on Linux, you can use either of these package managers, depending on your Linux distribution:

    Debian
    wget -qO - https://repository.hazelcast.com/api/gpg/key/public | sudo apt-key add -
    echo "deb https://repository.hazelcast.com/debian stable main" | sudo tee -a /etc/apt/sources.list
    sudo apt update && sudo apt install hazelcast
    RPM
    wget https://repository.hazelcast.com/rpm/hazelcast-rpm.repo -O hazelcast-rpm.repo
    sudo mv hazelcast-rpm.repo /etc/yum.repos.d/
    sudo yum install hazelcast

    At the moment, Hazelcast does not support any Windows package managers.

    To get started with Hazelcast on Windows, you can use Docker, the binary distribution, or Java.

  2. Check that the CLI is installed.

    hz-cli -V

    You should see your installed versions of the CLI, Hazelcast, and Management Center:

    CLI tool: 5.2021.07
    Hazelcast: 5.0-BETA-1
    Hazelcast Management Center: 5.0-SNAPSHOT

Using Docker

  1. Install Docker.

  2. Check that Docker is correctly installed.

    docker version
  3. If you do not see a version number, see the Docker docs for troubleshooting information.

  4. Pull the Hazelcast Docker image from Docker Hub.

    docker pull hazelcast/hazelcast:5.0-BETA-1

Using the Binary

Download the archive and extract the binaries.

  • Mac

  • Linux

  • Windows

curl 'https://download.hazelcast.com/download.jsp?version=hazelcast-5.0-BETA-1&type=tar&p=' | tar xvzf -
wget 'https://download.hazelcast.com/download.jsp?version=hazelcast-5.0-BETA-1&type=tar&p=' | tar xvzf -

Download and extract the Hazelcast archive for Windows.

Using Java

Hazelcast runs on Java, which means you can add it as a dependency in your Java project.

The Java package includes both a member API and a Java client API. The member API is for embedded topologies where you want to deploy and manage a cluster in the same Java Virtual Machine (JVM) as your applications. The Java client is for connecting to an existing member in a client/server topology.

  1. Download and install a supported JDK.

    We recommend installing the AdoptOpenJDK.
  2. If you’re using Maven, create a new project and add the following to your pom.xml file.

    <repositories>
       <repository>
           <id>snapshot-repository</id>
           <name>Maven2 Snapshot Repository</name>
           <url>https://oss.sonatype.org/content/repositories/snapshots</url>
           <releases>
               <enabled>false</enabled>
           </releases>
           <snapshots>
               <enabled>true</enabled>
           </snapshots>
       </repository>
    </repositories>
    
    <dependencies>
       <dependency>
           <groupId>com.hazelcast</groupId>
           <artifactId>hazelcast</artifactId>
           <version>5.0-BETA-1</version>
       </dependency>
    </dependencies>
  3. If you aren’t using a build tool, add the hazelcast.jar dependency to your classpath.

Next Steps

To continue learning about Hazelcast, start a local cluster.