Skip to content

Commit 342f0c3

Browse files
authored
Add Red Hat Enterprise Linux and Rocky Linux installation instructions (#17423)
Added RHEL/Rocky install instructions (PyPI). Instructions cover versions 8 and 9 which are the only supported ones - except for RHEL7 which is now on extended life cycle support phase. Large part of the guide is for installing Python 3.11 or 3.12. RHEL8 ships with Python 3.6 and RHEL9 ships with 3.9. Newer Python versions can be installed easily as they don't interfere with OS software that still relies on the default Python version. I was first planning to add prerequisites part to the prerequisites section and then install instructions on the top of the page but that section is for pre-built packages so it just didn't sound right. So I just dumped everything to the PyPI section of the page. But suggestions to change are welcome. I also didn't combine these with Fedora section. I haven't tested those packages on RHEL and Fedora ships with Python 3.12 out-of-box.
1 parent 5871daf commit 342f0c3

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

changelog.d/17423.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add Red Hat Enterprise Linux and Rocky Linux 8 and 9 installation instructions.

docs/setup/forward_proxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ in Synapse can be deactivated.
6767
**NOTE**: This has an impact on security and is for testing purposes only!
6868

6969
To deactivate the certificate validation, the following setting must be added to
70-
your [homserver.yaml](../usage/configuration/homeserver_sample_config.md).
70+
your [homeserver.yaml](../usage/configuration/homeserver_sample_config.md).
7171

7272
```yaml
7373
use_insecure_ssl_client_just_for_testing_do_not_use: true

docs/setup/installation.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,62 @@ sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
309309
libwebp-devel libxml2-devel libxslt-devel libpq-devel \
310310
python3-virtualenv libffi-devel openssl-devel python3-devel \
311311
libicu-devel
312-
sudo dnf groupinstall "Development Tools"
312+
sudo dnf group install "Development Tools"
313+
```
314+
315+
##### Red Hat Enterprise Linux / Rocky Linux
316+
317+
*Note: The term "RHEL" below refers to both Red Hat Enterprise Linux and Rocky Linux. The distributions are 1:1 binary compatible.*
318+
319+
It's recommended to use the latest Python versions.
320+
321+
RHEL 8 in particular ships with Python 3.6 by default which is EOL and therefore no longer supported by Synapse. RHEL 9 ship with Python 3.9 which is still supported by the Python core team as of this writing. However, newer Python versions provide significant performance improvements and they're available in official distributions' repositories. Therefore it's recommended to use them.
322+
323+
Python 3.11 and 3.12 are available for both RHEL 8 and 9.
324+
325+
These commands should be run as root user.
326+
327+
RHEL 8
328+
```bash
329+
# Enable PowerTools repository
330+
dnf config-manager --set-enabled powertools
331+
```
332+
RHEL 9
333+
```bash
334+
# Enable CodeReady Linux Builder repository
335+
crb enable
336+
```
337+
338+
Install new version of Python. You only need one of these:
339+
```bash
340+
# Python 3.11
341+
dnf install python3.11 python3.11-devel
342+
```
343+
```bash
344+
# Python 3.12
345+
dnf install python3.12 python3.12-devel
346+
```
347+
Finally, install common prerequisites
348+
```bash
349+
dnf install libicu libicu-devel libpq5 libpq5-devel lz4 pkgconf
350+
dnf group install "Development Tools"
351+
```
352+
###### Using venv module instead of virtualenv command
353+
354+
It's recommended to use Python venv module directly rather than the virtualenv command.
355+
* On RHEL 9, virtualenv is only available on [EPEL](https://docs.fedoraproject.org/en-US/epel/).
356+
* On RHEL 8, virtualenv is based on Python 3.6. It does not support creating 3.11/3.12 virtual environments.
357+
358+
Here's an example of creating Python 3.12 virtual environment and installing Synapse from PyPI.
359+
360+
```bash
361+
mkdir -p ~/synapse
362+
# To use Python 3.11, simply use the command "python3.11" instead.
363+
python3.12 -m venv ~/synapse/env
364+
source ~/synapse/env/bin/activate
365+
pip install --upgrade pip
366+
pip install --upgrade setuptools
367+
pip install matrix-synapse
313368
```
314369

315370
##### macOS

0 commit comments

Comments
 (0)