Install Confluent CLI¶
You can install the Confluent CLI using one of the following methods:
-
Download and install the latest version in the default directory:
curl -sL --http1.1 https://cnfl.io/cli | sh -s -- latest
For complete installation information, see Scripted installation.
Install¶
To install the latest version of the Confluent CLI client, use the Installation Script instructions.
Scripted installation¶
To use the scripted installation method on Microsoft Windows, you may need to
install an appropriate Linux environment, such as the Windows Subsystem for
Linux, to have the
curl
and sh
commands available.
The installation script detects which system you are running on and downloads the appropriate binary.
Default installation¶
To install the latest version of the Confluent CLI in the default directory:
Download and install the latest version in the default directory,
./bin
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- latest
Add the
./bin
directory to your$PATH
:export PATH=$(pwd)/bin:$PATH
Custom installation¶
To install a specific version of Confluent CLI into a custom directory:
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 default download directory is
./bin
.To download and install a specific version of the Confluent CLI, specify
v
followed by the version number:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- v<version>
To download and install the Confluent CLI in a custom directory, specify
-b
followed by a custom directory path,<path-to-cli>
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -b <path-to-cli> v<version>
For example, to download version 3.0.1 of Confluent CLI to
/user/local/bin
:curl -sL --http1.1 https://cnfl.io/cli | sh -s -- -b /usr/local/bin v3.0.1
Set the
$PATH
environment variable to include the directory that you downloaded the CLI binaries in the previous step:export PATH=<path-to-cli>:$PATH
Optionally, if you do not have enough space in the default directory that CLI stores logs and data, set the
CONFLUENT_CURRENT
environment variable to use a different directory:export CONFLUENT_CURRENT=<path-to-confluent-local-data>
Use Confluent CLI in the Confluent Platform package¶
Confluent Platform installation packages include the Confluent CLI binaries for each of the operating system and architecture types that the Confluent CLI supports.
Confluent Community software users must download the Confluent CLI separately and configure it manually.
To use the Confluent CLI in the Confluent Platform package:
Set the Confluent Platform home environment variable:
export CONFLUENT_HOME=<The directory where Confluent is installed>
Add the location of the CLI to the
PATH
:export PATH=$CONFLUENT_HOME/bin:$PATH
Install alternative version in Confluent Platform package¶
The version of the Confluent CLI used by Confluent Platform can be changed by downloading a specific Confluent CLI binary and using it to replace the current binary.
When you download and install the Confluent CLI outside of the Confluent Platform package, ensure that you are installing a Confluent CLI version that is compatible with the version of Confluent Platform you are running. For reference, see the Confluent CLI to Confluent Platform compatibility table.
Download the appropriate version of the 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/
.For example, on macOS, which is the
darwin
operating system type andamd64
architecture type:cp <cli binaries> $CONFLUENT_HOME/libexec/cli/darwin_amd64/
Tarball or ZIP installation¶
Download and install the most recently released CLI binaries for your platform:
Set the
PATH
environment to include the directory that you downloaded the CLI binaries in the previous step:export PATH=<path-to-cli>:$PATH
Optionally, if you do not have enough space in the default directory that CLI stores logs and data, set the
CONFLUENT_CURRENT
environment variable to use a different directory:export CONFLUENT_CURRENT=<path-to-confluent-local-data>
Verify¶
Confirm the version and the OS type of the CLI with the following command:
confluent version
Upgrade¶
Use the confluent update
command to upgrade from an earlier version of the
Confluent CLI to a newer version. For the full syntax, see confluent update.
To ensure compatibility, updates using the confluent update
command are
disabled for the CLI packaged with Confluent Platform. If you need to upgrade
to a higher version of CLI, see Install alternative version in Confluent Platform package.
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