{"id":8857,"date":"2021-08-03T05:47:38","date_gmt":"2021-08-03T05:47:38","guid":{"rendered":"https:\/\/linuxways.net\/?p=8857"},"modified":"2021-08-03T05:47:38","modified_gmt":"2021-08-03T05:47:38","slug":"how-to-install-pgadmin-4-on-rocky-linux-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/red-hat\/how-to-install-pgadmin-4-on-rocky-linux-8\/","title":{"rendered":"How to Install PgAdmin 4 on Rocky Linux 8"},"content":{"rendered":"<p>Developed in Python, <a href=\"https:\/\/www.pgadmin.org\/docs\/pgadmin4\/development\/index.html\">PgAdmin4<\/a> is a popular frontend management tool for the PostgreSQL database system. It provides all the features you need to manage your PostgreSQL databases from a web UI. PgAdmin 4 replaces PgAdmin III which was developed in the C++ language and supports PostgreSQL 9.2 and later releases. If you are not a fan of managing databases on the PostgreSQL shell, then PgAdmin4 is the go to management tool. In this guide, we will focus on how to install PgAdmin4 on Rocky Linux 8.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>Before you begin, ensure that you have PostgreSQL installed. We already have a detailed guide on how to <a href=\"https:\/\/linuxways.net\/de\/red-hat\/how-to-install-postgresql-13-on-rocky-linux\/\">install PostgreSQL 13 on Rocky Linux<\/a>.<\/p>\n<p>Once installed, you can proceed to the following steps.<\/p>\n<h2><strong>Step 1: Add the PgAdmin 4 repository<\/strong><\/h2>\n<p>The first step is to disable the PostgreSQL common repositories. This will allows us to grab the latest PgAdmin4 packages.<\/p>\n<pre><strong>$ sudo yum-config-manager --disable pgdg-common<\/strong><\/pre>\n<p>AppStream repository for Rocky Linux does not provide PgAdmin4 packages by default. Therefore we will add the PgAdmin repository by downloading and install it straight from the PostgreSQL official site as follows.<\/p>\n<pre><strong>$ sudo rpm -i https:\/\/ftp.postgresql.org\/pub\/pgadmin\/pgadmin4\/yum\/pgadmin4-redhat-repo-2-1.noarch.rpm<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"210\" class=\"wp-image-8858\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-784.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-784.png 879w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-784-300x72.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-784-768x183.png 768w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/strong><\/p>\n<p>Once the repository is added, update the repositories to sync the newly added PostgreSQL repository.<\/p>\n<pre><strong>$ sudo dnf update<\/strong><\/pre>\n<p>When prompted, press \u2018<strong>y<\/strong>\u2019 to import the GPG key.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"323\" class=\"wp-image-8859\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-785.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-785.png 869w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-785-300x112.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-785-768x285.png 768w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><\/strong><\/p>\n<h2><strong>Step 2: Install PgAdmin 4<\/strong><\/h2>\n<p>Installing PgAdmin is quite easy from this point. Simply execute the command:<\/p>\n<pre><strong>$ sudo dnf install pgadmin4<\/strong><\/pre>\n<p>This installs PgAdmin 4 and other PgAdmin4 dependencies as shown.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"500\" class=\"wp-image-8860\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-786.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-786.png 870w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-786-300x172.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-786-768x441.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/strong><\/p>\n<h2><strong>Step 3: Start the Apache webserver<\/strong><\/h2>\n<p>Since PgAdmin 4 is powered by a web server and is accessed from the front-end, i.e web browser, we need to ensure that the Apache webserver is up and running. So, start the webserver and enable it on boot time<\/p>\n<pre><strong>$ sudo systemctl start httpd<\/strong><\/pre>\n<pre><strong>$ sudo systemctl enable --now httpd<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"755\" height=\"144\" class=\"wp-image-8861\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-787.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-787.png 755w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-787-300x57.png 300w\" sizes=\"auto, (max-width: 755px) 100vw, 755px\" \/><\/strong><\/p>\n<h2><strong>Step 4: Configure PgAdmin4 web service<\/strong><\/h2>\n<p>PgAdmin4 provide a shell script that creates a new user account for authenticating on a web browser, sets up PgAdmin4 in web mode, and restarts the Apache webserver to effect the changes.<\/p>\n<p>Therefore, run the script as follows.<\/p>\n<pre><strong>$ sudo \/usr\/pgadmin4\/bin\/setup-web.sh<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"450\" class=\"wp-image-8862\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-788.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-788.png 881w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-788-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-788-768x392.png 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/strong><\/p>\n<p>Finally, access the PgAdmin4 interface from the browser using the URL indicated.<\/p>\n<pre><strong>http:\/\/server-ip\/pgadmin4<\/strong><\/pre>\n<p>Provide the login credentials, i.e. the email and the password that you configured, and click on <strong>\u2018Login\u2019<\/strong>.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1222\" height=\"578\" class=\"wp-image-8863\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-789.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-789.png 1222w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-789-300x142.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-789-1024x484.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-789-768x363.png 768w\" sizes=\"auto, (max-width: 1222px) 100vw, 1222px\" \/><\/strong><\/p>\n<p>This presents the PostgreSQL dashboard as is visible from the image below. From here, you can connect or add a new database server and manage your databases and tables.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1219\" height=\"579\" class=\"wp-image-8864\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-790.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-790.png 1219w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-790-300x142.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-790-1024x486.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-790-768x365.png 768w\" sizes=\"auto, (max-width: 1219px) 100vw, 1219px\" \/><\/strong><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>We have tried to stick to the installation part only so that you can easily get started with PgAdmin4. Hopefully, you can now comfortably install PgAdmin 4 without an issue.<\/p>","protected":false},"excerpt":{"rendered":"<p>Developed in Python, PgAdmin4 is a popular frontend management tool for the PostgreSQL database system. It provides all the features you need to manage your PostgreSQL databases from&hellip;<\/p>","protected":false},"author":1,"featured_media":8957,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[165],"tags":[458],"class_list":["post-8857","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-red-hat","tag-pgadmin-4"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=8857"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8857\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/8957"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=8857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=8857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=8857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}