Pivotal Mac OS
Page last updated:
This topic describes how to install and uninstall the Cloud Foundry Command Line Interface (cf CLI).
If you are reading this, Pivotal has invited you to a git repo where you can build and edit documentation in the Ruby / Markdown / HTML format that the online publishing tool Bookbinder uses to build Pivotal's documentation. Here's how to install Bookbinder and build your docs from the repo, starting from scratch, on a Mac OS X machine. Mac Setup - pivotalworkspace soloist - Terminal Output - Terminal Saved Output.txt.
Overview
The cf CLI is the official command line client for Cloud Foundry.
The procedures in this topic describe how to install the cf CLI on your operating system. You can install the cf CLI with a package manager, an installer, or a compressed binary.
For more information about how to use the cf CLI, see Getting Started with cf CLI.
To learn when cf CLI updates are released and to download a new binary or installer, see Releases in the Cloud Foundry CLI repository on GitHub.
There are currently two major versions of the cf CLI, v6 and v7. See the README to decide which version to use.
Prerequisites
If you previously used the cf CLI Ruby gem, you must uninstall the gem before installing the cf CLI.
To uninstall the gem:
Run:
Verify that your Ruby environment manager uninstalled the gem by closing and reopening your terminal.
Install the cf CLI Using a Package Manager
These sections describe how to install the cf CLI using a package manager. You can install the cf CLI using a package manager on Mac OS X and Linux operating systems.
Linux Installation
There are two ways to install the cf CLI using a package manager, depending on your Linux distribution.
To install the cf CLI on Debian and Ubuntu-based Linux distributions:
Add the Cloud Foundry Foundation public key and package repository to your system by running:
Update your local package index by running:
To install cf CLI v6, run:
To install cf CLI v7, run:
To install the cf CLI on Enterprise Linux and Fedora RHEL6/CentOS6 and later distributions:
Configure the Cloud Foundry Foundation package repository by running:
To install cf CLI v6, run:
To install cf CLI v7, run:
This also downloads and adds the public key to your system.
Mac OS X Installation
You can install the cf CLI on Mac OS X operating systems using the Homebrew package manager.
To install the cf CLI for Mac OS X using Homebrew:
Install Homebrew. For instructions, see Install Homebrew on the Homebrew website.
To install cf CLI v6, run:
To install cf CLI v7, run:
Install the cf CLI Using an Installer
This section describes how to install the cf CLI using an installer. You can install the cf CLI using an installer on Windows, Mac OS X, and Linux operating systems.
Linux Installation
This section describes how to install the cf CLI using an installer on the Debian, Ubuntu, and Red Hat Linux distributions.
To install the cf CLI for Linux using an installer, do the following:
Download the Linux installer.
Debian or Ubuntu: Paste the following URL in a browser to download the installer:
Red Hat: Paste the following URL in a browser to download the installer:
Install the cf CLI using your system’s package manager.
Note: The following commands may require
sudo
.Debian or Ubuntu: Run the following command:
Red Hat: Run the following command:
Mac OS X Installation
This section describes how to install the cf CLI on Mac OS X operating systems using an installer.
To install the cf CLI for Mac OS X using an installer, do the following:
Paste the following URL in a browser to download the installer:
Open the
.pkg
file.In the installer wizard, click Continue.
Select an install destination and click Continue.
Click Install.
Windows Installation
This section describes how to install the cf CLI for use on the Windows command line. For instructions on how to install the cf CLI for use on the Windows Subsystem for Linux (WSL), also known as Bash, see Linux Installation above.
To install the cf CLI for Windows using an installer, do the following:
Paste the following URL in a browser to download the installer:
Unzip the file.
Right-click on the
cf_installer
executable and select Run as Administrator.When prompted, click Install. Then, click Finish.
Install the cf CLI Using a Compressed Binary
You can install the cf CLI using a compressed binary on Windows, Mac OS X, and Linux operating systems.
For more information about downloading and installing a compressed binary for cf CLI v6, see Installers and compressed binaries.
For more information about downloading and installing a compressed binary for cf CLI v7, see Installers and compressed binaries.
Verify Installation
To verify the installation of the cf CLI:
Close and reopen the command prompt. Or, open a new tab in the command prompt.
Run:
If your installation was successful, the cf CLI help listing appears.
Uninstall the cf CLI
These sections describe how to uninstall the cf CLI. The method for uninstalling the cf CLI differs depending on the installation method.
Package Manager
If you installed the cf CLI with a package manager, follow the instructions specific to your package manager.
Installer
If you installed the cf CLI with an installer, follow the procedure in this section that is specific to your operating system.
To uninstall the cf CLI on Mac OS X:
Delete the binary
/usr/local/bin/cf
.Delete the directory
/usr/local/share/doc/cf-cli
.
To uninstall the cf CLI on Windows:
Pivotal Mac Os Download
Navigate to the Control Panel and click Programs and Features.
Select Cloud Foundry CLI VERSION.
Click Uninstall.
Binary
To uninstall the cf CLI after installing it with a binary:
Navigate to the location where you copied the binary.
Delete the binary.
- Install the Certificate on Local Machines
Page last updated:
This topic describes how developers can use the Cloud Foundry Command Line Interface (cf CLI) to communicate securely with a Pivotal Platform deployment with a self-signed certificate.
Overview
You can use the cf CLI to communicate securely with a Pivotal Platform deployment without specifying --skip-ssl-validation
under these circumstances:
The deployment uses a self-signed certificate.
The deployment uses a certificate that is signed by a self-signed certificate authority (CA), or a certificate signed by a certificate that is signed by a self-signed CA.
Before following the procedure below, the developer must obtain either the self-signed certificate or the intermediate and CA certificate(s) used to sign the deployment’s certificate. The developer can obtain these certificates from the Pivotal Platform operator.
Install the Certificate on Local Machines
The certificates you must insert into your local truststore vary depending on the configuration of your deployment.
If the deployment uses a self-signed certificate, the you must insert the self-signed certificate into your local truststore.
If the deployment uses a certificate that is signed by a self-signed CA, or a certificate signed by a certificate that is signed by a self-signed CA, you must insert the self-signed certificate and any intermediate certificates into your local truststore.
Install the Certificate on Mac OS X
Pivotal Microsoft Partner
To place the certificate file server.crt
into your local truststore for Mac OS X:
Run:
Install the Certificate on Linux
To place the certificate file server.crt
into your truststore for Linux:
Run one of these commands, depending on your Linux distrubution:
For Debian, Ubuntu, or Gentoo, run:
For Fedora or RHEL, run:
The examples above set the certificate permanently on your machine across all users and requiresudo
permissions. To set the certificate only in your current terminal or script, run one of these commands:export SSL_CERT_FILE=PATH-TO-SERVER.crt
WherePATH-TO-SERVER.crt
is the filepath of theserver.crt
certificate file.export SSL_CERT_DIR=PATH-TO-SERVER-DIRECTORY
WherePATH-TO-SERVER-DIRECTORY
is the directory of theserver.crt
certificate file.
Installing the Certificate on Windows
To place the certificate file server.crt
into your local truststore for Windows:
Right-click on the certificate file.
Click Install Certificate.
Choose to install the certificate as the Current User or Local Machine.
From the certification store list, select Trusted Root Certification Authorities.
Pivotal Mac OS