forked from cloudfoundry/docs-cf-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-go-cli.html.md.erb
132 lines (85 loc) · 6.14 KB
/
install-go-cli.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
title: Installing the cf CLI
owner: CLI
---
<strong><%= modified_date %></strong>
This topic describes how to install the Cloud Foundry Command Line Interface (cf CLI). Follow the instructions below for your operating system. If you previously used the cf CLI v5 Ruby gem, [uninstall](#version5) this gem first.
You can install the cf CLI with a package manager, an installer, or a compressed binary.
<%= vars.cli_rec_min_version %>
## <a id="pkg"></a>Use a Package Manager ##
###<a id='pkg-mac'></a> Mac OS X Installation###
For Mac OS X, perform the following steps to install the cf CLI with [Homebrew](http://brew.sh/):
1. Tap the Cloud Foundry formula [repository](https://github.com/cloudfoundry/homebrew-tap):
<pre class="terminal">$ brew tap cloudfoundry/tap</pre>
1. Install the cf CLI:
<pre class="terminal">$ brew install cf-cli</pre>
###<a id='pkg-linux'></a> Linux Installation###
For Debian and Ubuntu-based Linux distributions, perform the following steps:
1. Add the Cloud Foundry Foundation public key and package repository to your system:
<pre class="terminal">$ wget -q -O - https<span>:</span>//packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -</pre>
<pre class="terminal">$ echo "deb http<span>:</span>//packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list</pre>
1. Update your local package index:
<pre class="terminal">$ sudo apt-get update</pre>
1. Install the cf CLI:
<pre class="terminal">$ sudo apt-get install cf-cli</pre>
For Enterprise Linux and Fedora systems (RHEL6/CentOS6 and up), perform the following steps:
1. Configure the Cloud Foundry Foundation package repository:
<pre class="terminal">$ sudo wget -O /etc/yum.repos.d/cloudfoundry-cli.repo https<span>:</span>//packages.cloudfoundry.org/fedora/cloudfoundry-cli.repo</pre>
1. Install the cf CLI, which also downloads and adds the public key to your system:
<pre class="terminal">$ sudo yum install cf-cli</pre>
## <a id="installer"></a>Use an Installer ##
Follow the instructions for your operating system below.
### <a id="windows"></a>Windows Installation###
To use the cf CLI installer for Windows, perform the following steps:
1. Download [the Windows installer](https://cli.run.pivotal.io/stable?release=windows64&source=github).
1. Unpack the zip file.
1. Double click the `cf CLI` executable.
1. When prompted, click **Install**, then **Close**.
1. To verify your installation, open a terminal window and type `cf`.
If your installation was successful, the cf CLI help listing appears.
### <a id="mac"></a>Mac OS X Installation###
To use the cf CLI installer for Mac OS X, perform the following steps:
1. Download [the OS X installer](https://cli.run.pivotal.io/stable?release=macosx64&source=github).
1. Open the `.pkg` file.
1. In the installer wizard, click **Continue**.
1. Select an install destination and click **Continue**.
1. When prompted, click **Install**.
1. To verify your installation, open a terminal window and type `cf`.
If your installation was successful, the cf CLI help listing appears.
### <a id="linux"></a>Linux Installation###
To use the cf CLI installer for Linux, perform the following steps:
1. Download the Linux installer for your [Debian/Ubuntu](https://cli.run.pivotal.io/stable?release=debian64&source=github)
or [Red Hat](https://cli.run.pivotal.io/stable?release=redhat64&source=github) system.
1. Install using your system's package manager. Note these commands may require `sudo`.
* For Debian/Ubuntu, run the following command:
<pre class="terminal">$ dpkg -i path/to/cf-cli-*.deb && apt-get install -f</pre>
* For Red Hat, run the following command:
<pre class="terminal">rpm -i path/to/cf-cli-*.rpm</pre>
1. To verify your installation, open a terminal window and type `cf`.
If your installation was successful, the cf CLI help listing appears.
## <a id="bin"></a>Use a Compressed Binary##
Download the compressed binary for Mac OS X, Windows, or Linux from the cf CLI GitHub [repository](https://github.com/cloudfoundry/cli#installers-and-compressed-binaries) and install it on your system.
The specific procedures vary by operating system, but the following example illustrates downloading and installing the binary on Mac OS X:
1. Download and extract the Mac OS X binary:
<pre class="terminal">$ curl -L "https<span>:</span>//cli.run.pivotal.io/stable?release=macosx64-binary&source=github" | tar -zx</pre>
1. Move it to `/usr/local/bin`, or another location in your `$PATH`:
<pre class="terminal">$ mv cf /usr/local/bin</pre>
1. Confirm your cf CLI version:
<pre class="terminal">$ cf --version</pre>
## <a id="nextstep"></a>Next Steps ##
See [Getting Started with cf CLI](./getting-started.html) for more information about how to use the cf CLI.
We recommend that you review our [CLI releases page](https://github.com/cloudfoundry/cli/releases) to learn when updates are released, and download a new binary or a new installer when you want to update to the latest version.
## <a id="uninstall"></a>Uninstall the cf CLI ##
### <a id="uninstall-pkg"></a>Package Manager###
If you previously installed the cf CLI with a package manager, follow the instructions specific to your package manager to uninstall the cf CLI.
The specific procedures vary by package manager, but the following example illustrates uninstalling the cf CLI with Homebrew:
<pre class="terminal">$ brew uninstall cf-cli</pre>
### <a id="uninstall-installer"></a>Installer###
If you previously installed the cf CLI with an installer, perform the instructions specific to your operating system to uninstall the cf CLI:
* For Mac OS, delete the binary `/usr/local/bin/cf`, and the directory `/usr/local/share/doc/cf-cli`.
* For Windows, navigate to the **Control Panel**, click **Programs and Features**, select `Cloud Foundry CLI VERSION ` and click **Uninstall**.
### <a id="uninstall-binary"></a>Binary###
If you previously installed a cf CLI binary, remove the binary from where you copied it.
### <a id="version5"></a>cf CLI v5###
To uninstall, run `gem uninstall cf`.
<p class="note"><strong>Note</strong>: To ensure that your Ruby environment manager registers the change, close and reopen your terminal.</p>