Add PostgREST installation using package managers to tut0
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ language = 'en'
|
|||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This patterns also effect to html_static_path and html_extra_path
|
# This patterns also effect to html_static_path and html_extra_path
|
||||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'shared/*.rst']
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all
|
# The reST default role (used for this markup: `text`) to use for all
|
||||||
# documents.
|
# documents.
|
||||||
|
|||||||
@@ -3,58 +3,12 @@
|
|||||||
Installation
|
Installation
|
||||||
############
|
############
|
||||||
|
|
||||||
The release page has `pre-compiled binaries for Mac OS X, Windows, Linux and FreeBSD <https://github.com/PostgREST/postgrest/releases/latest>`_ .
|
The release page has `pre-compiled binaries for macOS, Windows, Linux and FreeBSD <https://github.com/PostgREST/postgrest/releases/latest>`_ .
|
||||||
The Linux binary is a static executable that can be run on any Linux distribution.
|
The Linux binary is a static executable that can be run on any Linux distribution.
|
||||||
|
|
||||||
You can also use your OS package manager.
|
You can also use your OS package manager.
|
||||||
|
|
||||||
.. tabs::
|
.. include:: ../shared/installation.rst
|
||||||
|
|
||||||
.. group-tab:: Mac OSX
|
|
||||||
|
|
||||||
You can install PostgREST from the `Homebrew official repo <https://formulae.brew.sh/formula/postgrest>`_.
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
brew install postgrest
|
|
||||||
|
|
||||||
.. group-tab:: FreeBSD
|
|
||||||
|
|
||||||
You can install PostgREST from the `official ports <https://www.freshports.org/www/hs-postgrest>`_.
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
pkg install hs-postgrest
|
|
||||||
|
|
||||||
.. group-tab:: Linux
|
|
||||||
|
|
||||||
.. tabs::
|
|
||||||
|
|
||||||
.. tab:: Arch Linux
|
|
||||||
|
|
||||||
You can install PostgREST from the `community repo <https://archlinux.org/packages/extra/x86_64/postgrest/>`_.
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
pacman -S postgrest
|
|
||||||
|
|
||||||
.. tab:: Nix
|
|
||||||
|
|
||||||
You can install PostgREST from nixpkgs.
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
nix-env -i haskellPackages.postgrest
|
|
||||||
|
|
||||||
.. group-tab:: Windows
|
|
||||||
|
|
||||||
You can install PostgREST using `Chocolatey <https://community.chocolatey.org/packages/postgrest>`_ or `Scoop <https://github.com/ScoopInstaller/Scoop>`_.
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
choco install postgrest
|
|
||||||
scoop install postgrest
|
|
||||||
|
|
||||||
|
|
||||||
.. _pg-dependency:
|
.. _pg-dependency:
|
||||||
|
|
||||||
@@ -242,7 +196,7 @@ You can build PostgREST from source with `Stack <https://github.com/commercialha
|
|||||||
Ubuntu/Debian libpq-dev, libgmp-dev, zlib1g-dev
|
Ubuntu/Debian libpq-dev, libgmp-dev, zlib1g-dev
|
||||||
CentOS/Fedora/Red Hat postgresql-devel, zlib-devel, gmp-devel
|
CentOS/Fedora/Red Hat postgresql-devel, zlib-devel, gmp-devel
|
||||||
BSD postgresql12-client
|
BSD postgresql12-client
|
||||||
OS X libpq, gmp
|
macOS libpq, gmp
|
||||||
===================== =======================================
|
===================== =======================================
|
||||||
|
|
||||||
* Build and install binary
|
* Build and install binary
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
.. tabs::
|
||||||
|
|
||||||
|
.. group-tab:: macOS
|
||||||
|
|
||||||
|
You can install PostgREST from the `Homebrew official repo <https://formulae.brew.sh/formula/postgrest>`_.
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
brew install postgrest
|
||||||
|
|
||||||
|
.. group-tab:: FreeBSD
|
||||||
|
|
||||||
|
You can install PostgREST from the `official ports <https://www.freshports.org/www/hs-postgrest>`_.
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
pkg install hs-postgrest
|
||||||
|
|
||||||
|
.. group-tab:: Linux
|
||||||
|
|
||||||
|
.. tabs::
|
||||||
|
|
||||||
|
.. tab:: Arch Linux
|
||||||
|
|
||||||
|
You can install PostgREST from the `community repo <https://archlinux.org/packages/extra/x86_64/postgrest/>`_.
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
pacman -S postgrest
|
||||||
|
|
||||||
|
.. tab:: Nix
|
||||||
|
|
||||||
|
You can install PostgREST from nixpkgs.
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
nix-env -i haskellPackages.postgrest
|
||||||
|
|
||||||
|
.. group-tab:: Windows
|
||||||
|
|
||||||
|
You can install PostgREST using `Chocolatey <https://community.chocolatey.org/packages/postgrest>`_ or `Scoop <https://github.com/ScoopInstaller/Scoop>`_.
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
choco install postgrest
|
||||||
|
scoop install postgrest
|
||||||
+24
-2
@@ -38,7 +38,25 @@ This will run the Docker instance as a daemon and expose port 5433 to the host s
|
|||||||
Step 3. Install PostgREST
|
Step 3. Install PostgREST
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
PostgREST is distributed as a single binary, with versions compiled for major distributions of Linux/BSD/Windows. Visit the `latest release <https://github.com/PostgREST/postgrest/releases/latest>`_ for a list of downloads. In the event that your platform is not among those already pre-built, see :ref:`build_source` for instructions how to build it yourself. Also let us know to add your platform in the next release.
|
Using a Package Manager
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
You can use your OS package manager to install PostgREST.
|
||||||
|
|
||||||
|
.. include:: ../shared/installation.rst
|
||||||
|
|
||||||
|
Then, try running it with:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
postgrest -h
|
||||||
|
|
||||||
|
It should print the help page with its version and the available options.
|
||||||
|
|
||||||
|
Downloading a Pre-Built Binary
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
PostgREST is also distributed as a single binary, with versions compiled for major distributions of macOS, Windows, Linux and FreeBSD. Visit the `latest release <https://github.com/PostgREST/postgrest/releases/latest>`_ for a list of downloads. In the event that your platform is not among those already pre-built, see :ref:`build_source` for instructions how to build it yourself. Also let us know to add your platform in the next release.
|
||||||
|
|
||||||
The pre-built binaries for download are :code:`.tar.xz` compressed files (except Windows which is a zip file). To extract the binary, go into the terminal and run
|
The pre-built binaries for download are :code:`.tar.xz` compressed files (except Windows which is a zip file). To extract the binary, go into the terminal and run
|
||||||
|
|
||||||
@@ -76,7 +94,7 @@ If everything is working correctly it will print out its version and the availab
|
|||||||
</div></div>
|
</div></div>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>OS X</summary>
|
<summary>macOS</summary>
|
||||||
<div class="highlight-bash"><div class="highlight">
|
<div class="highlight-bash"><div class="highlight">
|
||||||
<pre>brew install postgresql</pre>
|
<pre>brew install postgresql</pre>
|
||||||
</div></div>
|
</div></div>
|
||||||
@@ -172,6 +190,10 @@ Now run the server:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Running postgrest installed from a package manager
|
||||||
|
postgrest tutorial.conf
|
||||||
|
|
||||||
|
# Running postgrest binary
|
||||||
./postgrest tutorial.conf
|
./postgrest tutorial.conf
|
||||||
|
|
||||||
You should see
|
You should see
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ logins
|
|||||||
lon
|
lon
|
||||||
lt
|
lt
|
||||||
lte
|
lte
|
||||||
|
macOS
|
||||||
misprediction
|
misprediction
|
||||||
multi
|
multi
|
||||||
namespace
|
namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user