Add PostgREST installation using package managers to tut0

This commit is contained in:
Laurence Isla
2023-11-30 18:20:54 -05:00
committed by GitHub
parent 84152b483a
commit 62512268cd
5 changed files with 75 additions and 52 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# 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
# documents.
+3 -49
View File
@@ -3,58 +3,12 @@
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.
You can also use your OS package manager.
.. tabs::
.. 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
.. include:: ../shared/installation.rst
.. _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
CentOS/Fedora/Red Hat postgresql-devel, zlib-devel, gmp-devel
BSD postgresql12-client
OS X libpq, gmp
macOS libpq, gmp
===================== =======================================
* Build and install binary
+46
View File
@@ -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
View File
@@ -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
-------------------------
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
@@ -76,7 +94,7 @@ If everything is working correctly it will print out its version and the availab
</div></div>
</details>
<details>
<summary>OS X</summary>
<summary>macOS</summary>
<div class="highlight-bash"><div class="highlight">
<pre>brew install postgresql</pre>
</div></div>
@@ -172,6 +190,10 @@ Now run the server:
.. code-block:: bash
# Running postgrest installed from a package manager
postgrest tutorial.conf
# Running postgrest binary
./postgrest tutorial.conf
You should see
+1
View File
@@ -80,6 +80,7 @@ logins
lon
lt
lte
macOS
misprediction
multi
namespace