{%extends "base.html" %} {%block title%}Howto{%endblock%} {%block maincontent%}
You can use the zypper package manager to install Postgres and/or other components on an SLES 15 / SLES 12 host. zypper will attempt to satisfy package dependencies as it installs a package, but some components (mainly PostGIS) require access to specific repositories that are not hosted at postgresql.org or SLES official repositories:
zypper addrepo https://download.opensuse.org/repositories/devel:/libraries:/c_c++/15.6/devel:libraries:c_c++.repo
zypper addrepo https://download.opensuse.org/repositories/science/15.6/science.repo
zypper addrepo https://download.opensuse.org/repositories/Application:/Geo/15.6/Application:Geo.repo
zypper addrepo https://download.opensuse.org/repositories/devel:languages:misc/SLE_15_SP4/devel:languages:misc.repo
Also add SUSEConnect and the SUSE Package Hub extension to the SLES host,
and register the host with SUSE, allowing access to SUSE repositories. Use
these commands:
SLES 15 SP 6:
zypper install SUSEConnect
SUSEConnect -p sle-module-desktop-applications/15.6/x86_64
SUSEConnect -p PackageHub/15.6/x86_64
SLES 15 SP5:
zypper install SUSEConnect
SUSEConnect -p sle-module-desktop-applications/15.5/x86_64
SUSEConnect -p PackageHub/15.5/x86_64
SLES 12:
zypper install SUSEConnect
SUSEConnect -p PackageHub/12/x86_64
SUSEConnect -p sle-sdk/12/x86_64
For detailed information about registering a SUSE host, visit: https://www.suse.com/support/kb/doc/?id=7016626.
To install Postgres and/or other components, run the following commands to add Postgres community repository configuration files to your SLES host:
rpm --import https://zypp.postgresql.org/keys/PGDG-RPM-GPG-KEY-SLES15; zypper install https://download.postgresql.org/pub/repos/zypp/reporpms/SLES-15-x86_64/pgdg-suse-repo-latest.noarch.rpm
zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-12-pg15.repo
zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-12-pg14.repo
zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-13.repo
zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-12.repo
After creating the repository configuration files, use the zypper
refresh
command to refresh the metadata on your SLES host to
include the Postgres SUSE repositories:
zypper refresh
After adding the repo, use the following command to install Postgres on the SLES host:
zypper install postgresql16-server
zypper install postgresql15-server
Please take a look at the Postgres SuSE package list to see what other packages are available in the repository.
{%endblock%}