Installing Hazelcast Open Source
Hazelcast offers package managers for Linux and Mac operating systems.
Package managers are the fastest way of installing Hazelcast. This option is for development purposes and is only available for Hazelcast Open Source. For production, use the other deployment options explained on this page.
To install Hazelcast, use one of the following methods, depending on your operating system:
To install on macOS, use the Homebrew package manager.
brew tap hazelcast/hz brew install firstname.lastname@example.org
Check that you have the GNU Wget package installed. You’ll use Wget to download the GPG keys for the Hazelcast package.
If you do not see a version number, download and install Wget.
Use either of these package managers to install Hazelcast, depending on your Linux distribution:Debian
wget -qO - https://repository.hazelcast.com/api/gpg/key/public | gpg --dearmor | sudo tee /usr/share/keyrings/hazelcast-archive-keyring.gpg > /dev/null echo "deb [signed-by=/usr/share/keyrings/hazelcast-archive-keyring.gpg] https://repository.hazelcast.com/debian stable main" | sudo tee -a /etc/apt/sources.list sudo apt update && sudo apt install hazelcast=5.2.4RPM
wget https://repository.hazelcast.com/rpm/stable/hazelcast-rpm-stable.repo -O hazelcast-rpm-stable.repo sudo mv hazelcast-rpm-stable.repo /etc/yum.repos.d/ sudo yum install hazelcast-5.2.4
Check that Hazelcast is installed.
You should see the version of both Hazelcast and the command-line client (CLI).
For more information about the package manager, see the GitHub repository.
Download the latest snapshot archive and extract the binaries.
To start the cluster, see Start a Local Cluster from Binary.
To install Hazelcast with Java, you can use one of the following:
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, such as Hazelcast Viridian Cloud.
If you aren’t using a build tool, download the Hazelcast JAR file and add it to your classpath.
If you’re using JDK 11 or later, you can use Hazelcast as a module in the Java Platform Module System (JPMS).
To run your application with Hazelcast
libraries on the modulepath, use the
hazelcast-5.2.4.jar module name.
The JPMS comes with stricter visibility rules. It affects Hazelcast which uses the internal Java API to reach the best performance results.
Hazelcast needs the
java.se module and access to the following Java
You can provide access to these packages by using
--add-opens (for reflective access) Java arguments.
java --add-modules java.se \ --add-exports java.base/jdk.internal.ref=ALL-UNNAMED \ --add-opens java.base/java.lang=ALL-UNNAMED \ --add-opens java.base/java.nio=ALL-UNNAMED \ --add-opens java.base/sun.nio.ch=ALL-UNNAMED \ --add-opens java.management/sun.management=ALL-UNNAMED \ --add-opens jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED \ --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED \ -jar hazelcast-5.2.4.jar
java --add-modules java.se \ --add-exports java.base/jdk.internal.ref=com.hazelcast.core \ --add-opens java.base/java.lang=com.hazelcast.core \ --add-opens java.base/java.nio=com.hazelcast.core \ --add-opens java.base/sun.nio.ch=com.hazelcast.core \ --add-opens java.management/sun.management=com.hazelcast.core \ --add-opens jdk.management/com.ibm.lang.management.internal=com.hazelcast.core \ --add-opens jdk.management/com.sun.management.internal=com.hazelcast.core \ --module-path lib \ (1) --module com.hazelcast.core/com.hazelcast.core.server.HazelcastMemberStarter
|1||This example expects the