如何在RHEL 9服务器中安装PostgreSQL 15和 pgAdmin

在RHEL 9中安装PostgreSQL 15和pgAdmin,首先启用EPEL仓库,然后使用yum命令安装postgresql15和pgadmin4。完成后,启动服务并设置开机启动。

在RHEL 9服务器中安装PostgreSQL 15和pgAdmin,可以按照以下步骤进行:

1. 安装PostgreSQL 15

如何在RHEL 9服务器中安装PostgreSQL 15和 pgAdmin

1.1 添加PostgreSQL官方仓库

sudo dnf install y https://download.postgresql.org/pub/repos/yum/reporpms/EL9x86_64/pgdgredhat902.noarch.rpm

1.2 安装PostgreSQL 15

sudo dnf install y postgresql15 postgresql15server

1.3 启动并设置开机自启PostgreSQL服务

如何在RHEL 9服务器中安装PostgreSQL 15和 pgAdmin

sudo systemctl enable now postgresql15

2. 安装pgAdmin

2.1 添加pgAdmin官方仓库

sudo dnf install y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel9x86_64/pgdgredhat102.noarch.rpm

2.2 安装pgAdmin

如何在RHEL 9服务器中安装PostgreSQL 15和 pgAdmin

sudo dnf install y pgadmin4

2.3 启动并设置开机自启pgAdmin服务

sudo systemctl enable now pgadmin4

至此,您已经在RHEL 9服务器上成功安装了PostgreSQL 15和pgAdmin,接下来,您可以使用浏览器访问pgAdmin Web界面(默认地址为http://服务器IP地址:5050),并使用默认的用户名和密码(均为"admin")登录,在首次登录后,系统会提示您修改默认密码。

原创文章,作者:未希,如若转载,请注明出处:https://www.kdun.com/ask/406370.html

(0)
未希新媒体运营
上一篇 2024-03-29 17:05
下一篇 2024-03-29 17:08

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

云产品限时秒杀。精选云产品高防服务器,20M大带宽限量抢购  >>点击进入