github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/website/source/docs/install/index.html.md (about)

     1  ---
     2  description: |
     3      Installing Packer is simple. You can download a precompiled binary or compile
     4      from source. This page details both methods.
     5  layout: docs
     6  page_title: Install
     7  sidebar_current: 'docs-install'
     8  ---
     9  
    10  # Install Packer
    11  
    12  Installing Packer is simple. There are two approaches to installing Packer:
    13  
    14  1.  Using a [precompiled binary](#precompiled-binaries)
    15  
    16  2.  Installing [from source](#compiling-from-source)
    17  
    18  Downloading a precompiled binary is easiest, and we provide downloads over TLS
    19  along with SHA256 sums to verify the binary. We also distribute a PGP signature
    20  with the SHA256 sums that can be verified.
    21  
    22  ## Precompiled Binaries
    23  
    24  To install the precompiled binary, [download](/downloads.html) the appropriate
    25  package for your system. Packer is currently packaged as a zip file. We do not
    26  have any near term plans to provide system packages.
    27  
    28  Once the zip is downloaded, unzip it into any directory. The `packer` binary
    29  inside is all that is necessary to run Packer (or `packer.exe` for Windows). Any
    30  additional files, if any, aren't required to run Packer.
    31  
    32  Copy the binary to anywhere on your system. If you intend to access it from the
    33  command-line, make sure to place it somewhere on your `PATH`.
    34  
    35  ## Compiling from Source
    36  
    37  To compile from source, you will need [Go](https://golang.org) installed and
    38  configured properly (including a `GOPATH` environment variable set), as well
    39  as a copy of [`git`](https://www.git-scm.com/) in your `PATH`.
    40  
    41  1.  Clone the Packer repository from GitHub into your `GOPATH`:
    42  
    43      ``` shell
    44      $ mkdir -p $GOPATH/src/github.com/hashicorp && cd $_
    45      $ git clone https://github.com/hashicorp/packer.git
    46      $ cd packer
    47      ```
    48  
    49  2.  Build Packer for your current system and put the
    50      binary in `./bin/` (relative to the git checkout). The `make dev` target is
    51      just a shortcut that builds `packer` for only your local build environment (no
    52      cross-compiled targets).
    53  
    54      ``` shell
    55      $ make dev
    56      ```
    57  
    58  ## Verifying the Installation
    59  
    60  To verify Packer is properly installed, run `packer -v` on your system. You
    61  should see help output. If you are executing it from the command line, make sure
    62  it is on your PATH or you may get an error about Packer not being found.
    63  
    64  ``` shell
    65  $ packer -v
    66  ```