forked from cloudfoundry/docs-cf-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-go-cli.html.md.erb
166 lines (97 loc) · 5.49 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
title: Installing the cf CLI
owner: CLI
---
<div class="quick-links">
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#pkg">Install the cf CLI Using a Package Manager</a></li>
<ul>
<li><a href="#pkg-linux">Linux Installation</a></li>
<li><a href="#pkg-mac">Mac OS X Installation</a></li>
</ul>
<% if not vars.platform_code == 'CF' %>
<li><a href="#installer">Install the cf CLI Using an Installer</a></li>
<ul>
<li><a href="#installer-linux">Linux Installation</a></li>
<li><a href="#installer-mac">Mac OS X Installation</a></li>
<li><a href="#installer-windows">Windows Installation</a></li>
</ul>
<% end %>
<li><a href="#bin">Install the cf CLI Using a Compressed Binary</a></li>
<li><a href="#verify">Verify Installation</a></li>
<li><a href="#uninstall">Uninstall the cf CLI</a></li>
<ul>
<li><a href="#uninstall-pkg">Package Manager</a></li>
<li><a href="#uninstall-installer">Installer</a></li>
<li><a href="#uninstall-binary">Binary</a></li>
</ul>
</ul>
</div>
This topic describes how to install and uninstall the Cloud Foundry Command Line Interface (cf CLI).
## <a name="overview"></a> 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](getting-started.html).
To learn when cf CLI updates are released and to download a new binary or installer, see [Releases](https://github.com/cloudfoundry/cli/releases) in the Cloud Foundry CLI repository on GitHub.
## <a name="prerequisites"></a> Prerequisites
If you previously used the cf CLI Ruby gem, you must uninstall the gem before installing the cf CLI.
To uninstall the gem:
1. Run:
gem uninstall cf
1. Verify that your Ruby environment manager uninstalled the gem by closing and reopening your terminal.
## <a name="pkg"></a> 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.
### <a name='pkg-linux'></a> 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:
1. Add the Cloud Foundry Foundation public key and package repository to your system by running:
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
1. Update your local package index by running:
sudo apt-get update
1. Install the cf CLI by running:
sudo apt-get install cf-cli
To install the cf CLI on Enterprise Linux and Fedora RHEL6/CentOS6 and later distributions:
1. Configure the Cloud Foundry Foundation package repository by running:
sudo wget -O /etc/yum.repos.d/cloudfoundry-cli.repo https://packages.cloudfoundry.org/fedora/cloudfoundry-cli.repo
1. Install the cf CLI by running:
sudo yum install cf-cli
This also downloads and adds the public key to your system.
### <a name='pkg-mac'></a> 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:
1. Install Homebrew. For instructions, see [Install Homebrew](http://brew.sh/) on the Homebrew website.
1. Install the cf CLI by running:
brew install cloudfoundry/tap/cf-cli
<% if not vars.platform_code == 'CF' %>
<%= partial '../console/cf_cli_installer' %>
<% else %>
<% end %>
## <a name="bin"></a> 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, see [Installers and compressed binaries](https://github.com/cloudfoundry/cli#installers-and-compressed-binaries) in the Cloud Foundry CLI repository on GitHub.
## <a name="verify"></a> Verify Installation
To verify the installation of the cf CLI:
1. Close and reopen the command prompt. Or, open a new tab in the command prompt.
1. Run:
cf --help
If your installation was successful, the cf CLI help listing appears.
## <a name="uninstall"></a> 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.
### <a name="uninstall-pkg"></a> Package Manager
If you installed the cf CLI with a package manager, follow the instructions specific to your package manager.
### <a name="uninstall-installer"></a> 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:
1. Delete the binary `/usr/local/bin/cf`.
1. Delete the directory `/usr/local/share/doc/cf-cli`.
To uninstall the cf CLI on Windows:
1. Navigate to the **Control Panel** and click **Programs and Features**.
1. Select **Cloud Foundry CLI VERSION**.
1. Click **Uninstall**.
### <a name="uninstall-binary"></a> Binary
To uninstall the cf CLI after installing it with a binary:
1. Navigate to the location where you copied the binary.
1. Delete the binary.