From 6e82a55d68bf2657ff44aca34801ded8f695a1c5 Mon Sep 17 00:00:00 2001 From: Joe Nelson Date: Mon, 10 Oct 2016 09:53:43 -0700 Subject: [PATCH] Installation page --- index.rst | 5 ++++ install.rst | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 install.rst diff --git a/index.rst b/index.rst index c3fbe2bcb..7614a96d4 100644 --- a/index.rst +++ b/index.rst @@ -8,6 +8,11 @@ intro.rst +.. toctree:: + :caption: Installation + + install.rst + .. Installation .. Binary Release .. Build from Source diff --git a/install.rst b/install.rst new file mode 100644 index 000000000..11fcfe2ac --- /dev/null +++ b/install.rst @@ -0,0 +1,78 @@ +Binary Release +============== + +The `release page `_ has precompiled binaries for Mac OS X, Windows, and several Linux distros. Extract the tarball and run the binary inside with the :code:`--help` flag to see usage instructions: + +.. code-block:: bash + + # Untar the release (available at https://github.com/begriffs/postgrest/releases/latest) + + $ tar zxf postgrest-[version]-[platform].tar.xz + + # Try running it + $ ./postgrest --help + + # You should see a usage help message + +Build from Source +================= + +When a prebuilt binary does not exist for your system you can build the project from source. You'll also need to do this if you want to help with development. `Stack `_ makes it easy. It will install any necessary Haskell dependencies on your system. + +* `Install Stack `_ for your platform +* Install Library Dependencies + + ===================== ============================ + Operating System Dependencies + ===================== ============================ + Ubuntu/Debian libpq-dev + CentOS/Fedora/Red Hat postgresql-devel, zlib-devel + BSD postgresql95-server + ===================== ============================ + +* Build and install binary + + .. code-block:: bash + + git clone https://github.com/begriffs/postgrest.git + cd postgrest + stack build --install-ghc + sudo stack install --allow-different-user --local-bin-path /usr/local/bin + +* Check that the server is installed: :code:`postgrest --help`. + +If you want to run the test suite, stack can do that too: :code:`stack test`. + +PostgreSQL dependency +===================== + +To use PostgREST you will need an underlying database (PostgreSQL version 9.3 or greater is required). You can use something like Amazon `RDS `_ but installing your own locally is cheaper and more convenient for development. + +* `Instructions for OS X `_ +* `Instructions for Ubuntu 14.04 `_ +* `Installer for Windows `_ + +Homebrew +======== + +You can use the Homebrew package manager to install PostgREST on Mac + +.. code-block:: bash + + # Ensure brew is up to date + brew update + + # Check for any problems with brew's setup + brew doctor + + # Install the postgrest package + brew install postgrest + +This will automatically install PostgreSQL as a dependency. The process tends to take up to 15 minutes to install the package and its dependencies. + +After installation completes, the tool is added to your $PATH and can be used from anywhere with: + +.. code-block:: bash + + postgrest --help +