aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/install.md
diff options
context:
space:
mode:
authorGravatar dzc <dzc@google.com>2017-05-31 20:37:50 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-06-01 14:07:52 +0200
commit22b85a2a3c79c6f3aef1e0a61e485bb135be4551 (patch)
tree8235e8237b171ced2fa9f39f054f9a7d808c0771 /site/docs/install.md
parent40d64293b57f0d62bb15599c730f38484b91d3f0 (diff)
Restructure site/ directory into docs/ which only contains Bazel documentation.
The new docs/ directory in the bazel source tree will only contain the Bazel docs site, which is hosted at docs.bazel.build. This change deletes the marketing site and blog, which have been migrated to the bazel-website and bazel-blog GitHub repositories respectively. This change also updates the serve-docs.sh and ci/build.sh under scripts/ in preparation for publishing the docs site. Note that to help make reviews more manageable, this change is limited to moving files to their new locations. Here are the follow-up changes: * Update all links in docs to remove versions/master in paths and to add correct bazel.build subdomain when linking to pages on the marketing site or the blog. * Set up versioned directories on GCS bucket and add tooling for versioning docs This change is also coordinated with https://bazel-review.googlesource.com/c/11568/ to have the PublishSite job publish to docs.bazel.build rather than www.bazel.build. Issue #2397 RELNOTES: None PiperOrigin-RevId: 157612651
Diffstat (limited to 'site/docs/install.md')
-rw-r--r--site/docs/install.md87
1 files changed, 85 insertions, 2 deletions
diff --git a/site/docs/install.md b/site/docs/install.md
index 1166fe133c..fe7c46e650 100644
--- a/site/docs/install.md
+++ b/site/docs/install.md
@@ -1,4 +1,87 @@
---
-layout: redirect
-redirect: docs/install.html
+layout: documentation
+title: Installing Bazel
---
+
+# Installing Bazel
+
+See the instructions for installing Bazel on:
+
+* [Ubuntu Linux (16.04, 15.10, and 14.04)](install-ubuntu.md)
+* [Mac OS X](install-os-x.md)
+* [Windows (experimental)](install-windows.md)
+
+For other platforms, you can try to [compile from source](install-compile-source.md).
+
+Required Java version:
+
+Java JDK 8 or later is required. To address the problem of JDK 8 not being
+available on some machines, Bazel's binary installer embeds a JDK by default.
+
+**Note:** Homebrew and Debian packages do not contain the embedded JDK. The
+shell installers are the only ones with an embedded JDK.
+
+Extras:
+
+* [Bash completion](#bash)
+* [zsh completion](#zsh)
+
+For more information on using Bazel, see
+[Getting Started with Bazel](getting-started.html).
+
+
+## <a name="jdk7"></a>Using Bazel with JDK 7
+
+Bazel version _0.5.0_ does run with JDK 7. However, starting with version
+_0.5.1_ Bazel must use JDK 8.
+
+The installers available for _0.5.0_ are:
+
+* `bazel-0.5.0-installer.sh`: default version with embedded JDK
+* `bazel-0.5.0-without-jdk-installer.sh`: version without embedded JDK
+* `bazel-0.5.0-jdk7-installer.sh`: version compatible with JDK 7, will not be
+ available in later releases
+
+## <a name="bash"></a>Getting bash completion
+
+Bazel comes with a bash completion script, which the installer copies into the
+`bin` directory. If you ran the installer with `--user`, this will be
+`$HOME/.bazel/bin`. If you ran the installer as root, this will be
+`/usr/local/bazel/bin`.
+
+Copy the `bazel-complete.bash` script to your completion folder
+(`/etc/bash_completion.d` directory under Ubuntu). If you don't have a
+completion folder, you can copy it wherever suits you and insert
+`source /path/to/bazel-complete.bash` in your `~/.bashrc` file (under OS X, put
+it in your `~/.bash_profile` file).
+
+If you built Bazel from source, the bash completion target is in the `//scripts`
+package:
+
+1. Build it with Bazel: `bazel build //scripts:bazel-complete.bash`.
+2. Copy the script `bazel-bin/scripts/bazel-complete.bash` to one of the
+ locations described above.
+
+## <a name="zsh"></a>Getting zsh completion
+
+Bazel also comes with a zsh completion script. To install it:
+
+1. Add this script to a directory on your $fpath:
+
+ ```
+ fpath[1,0]=~/.zsh/completion/
+ mkdir -p ~/.zsh/completion/
+ cp scripts/zsh_completion/_bazel ~/.zsh/completion
+ ```
+
+ You may have to call `rm -f ~/.zcompdump; compinit`
+ the first time to make it work.
+
+2. Optionally, add the following to your .zshrc.
+
+ ```
+ # This way the completion script does not have to parse Bazel's options
+ # repeatedly. The directory in cache-path must be created manually.
+ zstyle ':completion:*' use-cache on
+ zstyle ':completion:*' cache-path ~/.zsh/cache
+ ```