Skip to content

Installing pgAdmin4 3.X on RHEL / CentOS 7 and Fedora 27

pgAdmin4 3.0 was recently released, and I made significant changes on the RPMS for better usability and better upgrade path. In this blog post, I'll mention about the details of what has changed from packaging point of view.
When pgAdmin4 1.0 was released, the idea was to add a version number with a v prefix -- so we ended up having pgadmin4-v1. We did the same for 2.0: pgadming-v2.

However, this caused significant upgrade issues. Given the path how pgAdmin4 is being developed, eventually I decided to get rid of that number. Starting pgAdmin4 3.0, the package names start with pgadmin4- only.

Another problem was the dependency hell. pgAdmin4 depends on lots of Python modules either not included in the distro, or or the versions in the distro are too old for pgAdmin4. Along with the Python dependencies, there is the qt dependency, which lots of server-only users complained before (and they were quite right)

We are listening to you!

In the latest release we have 5 packages now, instead of 3:

- pgadmin4: The meta package that pulls pgadmin4-web and pgadmin4-docs, which is enough to run pgAdmin4 on a non-GUI server.

- pgadmin4-web: The required files to run pgAdmin4 as a web application. In previous versions, this package carried both web and desktop components, causing complaints that I mentioned above. Now, this package conntains only the web portion, allowing server-only users to avoid installing qt and its deps.

- pgadmin4-docs: HTML docs both for web application and desktop modes.

- pgadmin4-desktop-common: Desktop components of pgAdmin4 for all window managers. This is a new package, and this package pulls in qt dependency!

- pgadmin4-desktop-gnome: The GNOME specific package for pgAdmin4. As of GNOME 3.26, the system tray was removed, which caused pgAdmin4 to fail to start. To tackle this issue, this package pulls in a GNOME shell extensions called "topicons-plus", and enables it.

So, to install pgadmin4 on RPM based distros, please install the PGDG RPM repository first, if you haven't done already: https://yum.postgresql.org/repopackages.php .

Please note that, before installing the new packages, I recommend you to remove all existing pgadmin4-v* packages. This will be a one-time operation only, subsequent updates won't require this.

Installing pgAdmin4 with server mode:

For server-only installations, run this command:

yum (or dnf) install pgadmin4


This command will pull pgadmin4-web and pgadmin4-docs packages along with other dependencies.

After installing the packages, as root user, you need to run a shell script provided by the packages:

/usr/pgadmin4/bin/pgadmin4-web-setup.sh


The script will ask you an email and password that you can use to login to pgAdmin4. After the configuration is done, script will configure Apache web server, by placing pgAdmin4 config file and starting/reloading the web server.

Installing pgAdmin4 with desktop mode:


For desktop mode on non-GNOME environment, please run this command:

yum (or dnf) install pgadmin4-desktop-common



For desktop mode on GNOME environment, please run this command:

yum (or dnf) install pgadmin4-desktop-gnome



No additional operation is needed at this point. Please select pgadmin4 in the desktop menu, and launch the application.

Please refer to the pgAdmin4 documentation for further details.

I would like to thank EnterpriseDB and Dave Page for letting me to work on this, and Fahar Abbas at EDB QA team for testing the new packages -- this is no less than 60 hours of development work and by myself at least 10 hours of QA time by Fahar.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Allan Lewis on :

The TopIcons Plus Gnome extension [1] is now archived [2]: perhaps there's a better solution?

[1]: https://extensions.gnome.org/extension/1031/topicons/
[2]: https://github.com/phocean/TopIcons-plus

Kieran McCusker on :

Just tried it with Fedora 27 KDE. After removing any trace of pgAdmin and installing
dnf install pgadmin4-desktop-common

Then going to pgAdmin launcher gives a fatal error "An error occurred initialising the application server".

I don't run apache but rather nginx are there more configuration steps required?

Thanks

Kieran

Tomáš Chaloupka on :

Try sudo dnf install python3-flask-babelex
as it isn't installed as a dependency for some reason.

Or try to run python3 /usr/lib/python3.6/site-packages/pgadmin4-web/pgAdmin4.py
and see the error there

Allan Lewis on :

I installed `pgadmin4-python3-flask-babelex.noarch` and that seems to have resolved the issue. Has anyone actually tested these RPMs in a clean environment?

Trina on :

I installed pg10, pgAdmin4, pgadmin4-desktop-common all using dnf install. But I cant start pgAdmin 4 as it says "An error occurred initialising the tray icon" What can be the problem? :-(

Please help asap

Andrey on :

Just installed pgAdmin with following commands:
```
sudo dnf install pgadmin4-desktop-common
sudo dnf install python3-flask-babelex
```
Applications starts, browser opens and says me that I am not authorized.

Unauthorized
The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.

How can I fix this issue?

The author does not allow comments to this entry

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options