github.com/daniellockard/packer@v0.7.6-0.20141210173435-5a9390934716/website/source/intro/getting-started/setup.html.markdown (about)

     1  ---
     2  layout: "intro"
     3  page_title: "Install Packer"
     4  prev_url: "/intro/platforms.html"
     5  next_url: "/intro/getting-started/build-image.html"
     6  next_title: "Build an Image"
     7  description: |-
     8    Packer must first be installed on the machine you want to run it on. To make installation easy, Packer is distributed as a binary package for all supported platforms and architectures. This page will not cover how to compile Packer from source, as that is covered in the README and is only recommended for advanced users.
     9  ---
    10  
    11  # Install Packer
    12  
    13  Packer must first be installed on the machine you want to run it on.
    14  To make installation easy, Packer is distributed as a [binary package](/downloads.html)
    15  for all supported platforms and architectures. This page will not cover how
    16  to compile Packer from source, as that is covered in the
    17  [README](https://github.com/mitchellh/packer/blob/master/README.md) and is only
    18  recommended for advanced users.
    19  
    20  ## Installing Packer
    21  
    22  To install packer, first find the [appropriate package](/downloads.html)
    23  for your system and download it. Packer is packaged as a "zip" file.
    24  
    25  Next, unzip the downloaded package into a directory where Packer will be
    26  installed. On Unix systems, `~/packer` or `/usr/local/packer` is generally good,
    27  depending on whether you want to restrict the install to just your user
    28  or install it system-wide. On Windows systems, you can put it wherever you'd
    29  like.
    30  
    31  After unzipping the package, the directory should contain a set of binary
    32  programs, such as `packer`, `packer-build-amazon-ebs`, etc. The final step
    33  to installation is to make sure the directory you installed Packer to
    34  is on the PATH. See [this page](http://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
    35  for instructions on setting the PATH on Linux and Mac.
    36  [This page](http://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
    37  contains instructions for setting the PATH on Windows.
    38  
    39  ## Verifying the Installation
    40  
    41  After installing Packer, verify the installation worked by opening
    42  a new command prompt or console, and checking that `packer` is available:
    43  
    44  ```text
    45  $ packer
    46  usage: packer [--version] [--help] <command> [<args>]
    47  
    48  Available commands are:
    49      build        build image(s) from template
    50      fix          fixes templates from old versions of packer
    51      inspect      see components of a template
    52      validate     check that a template is valid
    53  ```
    54  
    55  If you get an error that `packer` could not be found, then your PATH
    56  environment variable was not setup properly. Please go back and ensure
    57  that your PATH variable contains the directory which has Packer installed.
    58  
    59  Otherwise, Packer is installed and you're ready to go!
    60  
    61  ## Alternative Installation Methods
    62  
    63  While the binary packages is the only official method of installation, there
    64  are alternatives available.
    65  
    66  ### Homebrew
    67  
    68  If you're using OS X and [Homebrew](http://brew.sh), you can install Packer by
    69  adding the `binary` tap:
    70  
    71  ```text
    72  $ brew tap homebrew/binary
    73  $ brew install packer
    74  ```