Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RHEL and Clones compilation instructions #366

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 11 additions & 35 deletions InstallRHELandClones.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Installing on RHEL and Clones such as CentOS, Rocky Linux, AlmaLinux or Oracle

This document will show how to install tds_fdw on Rocky Linux 8.5. RHEL distributions should be similar.
This document will show how to install tds_fdw on Rocky Linux 8.9. RHEL distributions should be similar.

NOTE: For the sake of simplicity, we will use `yum` as it works as an alias for `dnf` on newer distributions.

Expand All @@ -17,20 +17,6 @@ NOTE: For the sake of simplicity, we will use `yum` as it works as an alias for

If you need to install PostgreSQL, do so by following the [RHEL installation instructions](https://www.postgresql.org/download/linux/redhat/).

Here is an extract of the instructions:

Only for RHEL 8 and clones such as Rocky Linux 8:
```bash
sudo sudo dnf -qy module disable postgresql # Not required for RHEL8 and clones
```

Install the PostgreSQL repository and packages:

```bash
sudo rpm -i https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install postgresql11 postgresql11-server postgresql11-libs postgresql11-devel
```

#### tds_fdw

The PostgreSQL development team packages `tds_fdw`, but they do not provide FreeTDS.
Expand All @@ -53,33 +39,29 @@ sudo yum install tds_fdw11.x86_64

If you need to install PostgreSQL, do so by following the [RHEL installation instructions](https://www.postgresql.org/download/linux/redhat/).

Here is an extract of the instructions:

Only for RHEL 8 and clones such as Rocky Linux 8:
```bash
sudo sudo dnf -qy module disable postgresql # Not required for RHEL8 and clones
```

Install the PostgreSQL repository and packages:
Make sure that, besides `postgresqlXX-server`, `postgresqlXX-devel` is installed as well

```bash
sudo rpm -i https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install postgresql11 postgresql11-server postgresql11-libs postgresql11-devel
```
You need to enable the PowerTools repository for RHEL8 and clones, or the CBR repository for RHEL9 and clones.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required as postgresqlXX-devel requires at least a perl dependency from there.


#### Install FreeTDS devel and build dependencies

The TDS foreign data wrapper requires a library that implements the DB-Library interface,
such as [FreeTDS](http://www.freetds.org).

**NOTE:** In CentOS, you need the [EPEL repository installed](https://fedoraproject.org/wiki/EPEL) to install FreeTDS
**NOTE:** You need the [EPEL repository installed](https://fedoraproject.org/wiki/EPEL) to install FreeTDS

```bash
sudo yum install epel-release
sudo yum install freetds-devel
```

## IMPORTANT: CentOS7/Oracle7 and PostgreSQL >= 11
Some other dependencies are also needed to install PostgreSQL and then compile tds_fdw:

```bash
sudo yum install clang llvm make redhat-rpm-config wget
```

#### IMPORTANT: CentOS7/Oracle7 and PostgreSQL >= 11
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not remove CentOS7 for now. It's EoL, but there are still some alive clones there, and the PostgreSQL development group still list it at their installation instructions.


When using the official PostgreSQL packages from postgresql.org, JIT with bitcode is enabled by default and will require llvm5 and `clang` from LLVM5 installed at `/opt/rh/llvm-toolset-7/root/usr/bin/clang` to be able to compile.

Expand All @@ -91,12 +73,6 @@ You can easily do it with the following commands:
sudo yum install centos-release-scl
```

Some other dependencies are also needed to install PostgreSQL and then compile tds_fdw:

```bash
sudo yum install gcc make wget
```

##### Build from release package

If you'd like to use one of the release packages, you can download and install them via something like the following:
Expand Down