Install
The Confluent CLI is included in the full Confluent Platform installation packages.
Updates using the confluent update
command are disabled for the CLI included
in the full Confluent Platform packages to ensure compatibility. See
Install alternative version in Confluent Platform packages for upgrading to a higher version of CLI
using a script.
Confluent Community software users must download the CLI separately and
configure it to point at their installation manually.
Important
When you separately download and install Confluent CLI, ensure you are
installing a Confluent CLI version that is compatible with the version of
Confluent Platform you are running. The latest version of Confluent CLI may not be
compatible with the version of Confluent Platform you are running. For reference, see the
Confluent CLI to Confluent Platform compatibility
table.
Supported environments
The Confluent CLI is supported for macOS, Microsoft Windows, and Linux (including
Alpine) operating systems.
Scripted installation
Note
On Microsoft Windows, an appropriate Linux environment may need to be
installed in order to have the curl
and sh
commands available, such
as the Windows Subsystem for Linux.
List all available Confluent CLI versions:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -l
Download a specific version listed in the above output list.
The script detects which system is running and downloads the appropriate binary.
To download and install Confluent CLI in the default directory, ./bin
:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- <version>
For example, to download the 1.16.3
version that is compatible with
Confluent Platform versions 6.0.x
:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- v1.16.3
To downaload and install Confluent CLI in a custom directory of your choice,
specify -b <path-to-cli>
.
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- v1.16.3 -b <path-to-cli>
The <path-to-cli>
must be in your PATH
.
Note the OS and architecture in use. For example, on macOS, the previous
script results in the following terminal output indicating the
machine’s appropriate binary is for the darwin
operating system type
and amd64
architecture type:
confluentinc/cli info found version: v1.16.3 for v1.16.3/darwin/amd64
Tarball or Zip installation
- Download and install the most recently released raw binaries by platform:
- Set the
PATH
environment to include the directory that you downloaded the
CLI binaries in the previous step.
Install alternative version in Confluent Platform packages
Confluent Platform packages include Confluent CLI binaries for each of
the operating system and architecture types that Confluent CLI supports.
The version of Confluent CLI used by Confluent Platform can be changed by downloading a
specific Confluent CLI binary and using it to replace the current binary.
Download the appropriate version of Confluent CLI as described in
Scripted installation.
Use the downloaded binary to replace the existing Confluent CLI binary
located in subdirectories of $CONFLUENT_HOME/libexec/cli/
.
In this example, the appropriate subdirectory is
$CONFLUENT_HOME/libexec/cli/darwin_amd64/
, which corresponds to the
operating system type and architecture type noted above.
Confirm the version and the OS type of the CLI with the following command:
Java version requirements
On non-Windows platforms, the Confluent CLI offers confluent local commands
(designed to operate on a local install of Confluent Platform) which require Java, and JDK version 1.8
or
1.11
is recommended. If you have multiple versions of Java installed, set
JAVA_HOME to the version you want Confluent Platform to use.
Important
Setting JAVA_HOME when you have multiple JDKs prevents the Confluent CLI from defaulting to the newest installed Java version, which may not be supported. If the default Java version is not supported, the CLI will fail with a message about unsupported Java versions even if a supported version is installed and set as the in-use JDK (shown as output to java -version
).
To set JAVA_HOME, add the location of a supported JDK to your PATH in a file such as .bash_profile
or by setting it temporarily as an environment variable in your current shell:
export JAVA_HOME=<path-to-JDK-home>
For example:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
To find the location of your installed Java versions, type the following in a command shell:
/usr/libexec/java_home -V
The output will look similar to this example, which happens to show two JDKs, 12.0.1
and 1.8.0_212
:
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
12.0.1, x86_64: "OpenJDK 12.0.1" /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home
1.8.0_212, x86_64: "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
In this case, you would add JDK 1.8
to your .bash_profile
:
#JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
The Confluent CLI will then run with the specified, supported JDK 1.8
, regardless of how many Java versions you have installed.
See also, Java supported versions for Confluent Platform.
Confluent Platform properties files
The following is a list of the default Confluent Platform services configuration properties
files, where $CONFLUENT_HOME
is the directory where you installed Confluent Platform. You
reference or modify the appropriate file when you work with a Confluent Platform service.
- Connect:
$CONFLUENT_HOME/etc/schema-registry/connect-avro-distributed.properties
- Control Center:
$CONFLUENT_HOME/etc/confluent-control-center/control-center-dev.properties
- Kafka:
$CONFLUENT_HOME/etc/kafka/server.properties
- REST Proxy:
$CONFLUENT_HOME/etc/kafka-rest/kafka-rest.properties
- ksqlDB:
$CONFLUENT_HOME/etc/ksqldb/ksql-server.properties
- Schema Registry:
$CONFLUENT_HOME/etc/schema-registry/schema-registry.properties
- ZooKeeper:
$CONFLUENT_HOME/etc/kafka/zookeeper.properties