General prerequisites
Before you install the DC/OS CLI, ensure the following:
- You have a separate computer that is not part of the DC/OS cluster on which you can install the CLI.
- You must have network access from the external system hosting the CLI to the DC/OS cluster.
- You can open a command-line shell terminal on the external system hosting the CLI.
- You are not using
noexec
to mount the/tmp
directory. Mounting the/tmp
directory with thenoexec
option can prevent CLI operations.
The recommended method to install the DC/OS CLI is from the DC/OS web interface. Or, you can manually install the CLI by using the following instructions.
Installing CLI from the web interface
-
Click Install CLI from the top-left corner of the DC/OS web interface.
-
Copy and paste the code snippets into your terminal.
Manually installing the CLI
Installing on Linux
Prerequisites
- You must have a separate computer that is not part of the DC/OS cluster on which you can install the CLI.
- You must have network access from the external system hosting the CLI to the DC/OS cluster.
- You must be able to open a command-line shell terminal on the external system hosting the CLI.
- You nust be able to run
cURL
program on the system hosting the CLI. Thecurl
command is installed by default on most Linux distributions. - You must not be using
noexec
to mount the/tmp
directory. Mounting the/tmp
directory with thenoexec
option can prevent CLI operations.
Installing the DC/OS CLI
-
If you do not already have a working directory for the CLI, create one. The preferred location is
/usr/local/bin
and all the instructions will reference this path.[ -d usr/local/bin ] || sudo mkdir -p /usr/local/bin
-
Download the DC/OS CLI binary (
dcos
) to your local directory (for example,/usr/local/bin/
).curl https://downloads.dcos.io/binaries/cli/linux/x86-64/dcos-1.10/dcos -o dcos
-
Move the CLI binary to your local bin directory.
sudo mv dcos /usr/local/bin
-
Make the CLI binary executable.
chmod +x /usr/local/bin/dcos
-
Set up the connection from the CLI to your DC/OS cluster. In this example,
http://example.com
is the master node URL.dcos cluster setup http://example.com
Follow the instructions in the DC/OS CLI. For more information about security, see the documentation.
Your CLI should now be authenticated with your cluster!
-
Type
dcos
to view usage information and get started.
Installing on macOS
Prerequisites
- You must have a separate computer that is not part of the DC/OS cluster on which you can install the CLI.
- You must have network access from the external system hosting the CLI to the DC/OS cluster.
- You must be able to open a command-line environment, such as Terminal, on the external system hosting the CLI.
- You nust be able to run
cURL
program on the system hosting the CLI. If you don’t havecURL
, follow the instructions in Install curl on Mac OSX to install it. - You must not be using
noexec
to mount the/tmp
directory. Mounting the/tmp
directory with thenoexec
option can prevent CLI operations.
Installing the DC/OS CLI
-
If you do not already have a working directory for the CLI, create one. The preferred location is
/usr/local/bin
and all the instructions will reference this path.[ -d usr/local/bin ] || sudo mkdir -p /usr/local/bin
-
Download the DC/OS CLI binary (
dcos
) to your local directory (for example,/usr/local/bin/
).curl https://downloads.dcos.io/binaries/cli/darwin/x86-64/dcos-1.10/dcos -o dcos
-
Move the CLI binary to your local bin directory.
sudo mv dcos /usr/local/bin
-
Make the CLI binary executable.
chmod +x dcos
-
Set up the connection from the CLI to your DC/OS cluster. In this example,
http://example.com
is the master node URL.dcos cluster setup http://example.com
If your system is unable to find the executable, you may need to re-open the command prompt or add the installation directory to your PATH environment variable manually.
Follow the instructions in the DC/OS CLI. For more information about security, see Security.
Your CLI should now be authenticated with your cluster.
-
Type
dcos
to view usage information and get started.
Installing on Windows
Prerequisites
- You must have a separate computer that is not part of the DC/OS cluster on which you can install the CLI.
- You must have network access from the external system hosting the CLI to the DC/OS cluster.
- You must be able to open a command-line environment, such as Windows PowerShell or the
cmd.exe
program, on the external system hosting the CLI. Windows PowerShell is installed by default on Windows 7 and later. - You nust disable any security or antivirus software before you start the installation.
- You must not be using
noexec
to mount the/tmp
directory. Mounting the/tmp
directory with thenoexec
option can prevent CLI operations.
-
Open the command-line environment using the Administrator credentials.
-
Download the DC/OS CLI executable to your local directory (dcos.exe).
-
Change into the directory of the downloaded file if you are not already there.
cd path/to/download/directory
-
Set up the connection from the CLI to your DC/OS cluster. In this example,
http://example.com
is the master node URL.dcos cluster setup http://example.com
Follow the instructions in the DC/OS CLI. For more information about security, see Security.
Your CLI should now be authenticated with your cluster.
-
Type
dcos
to view usage information and get started.