意见箱
恒创运营部门将仔细参阅您的意见和建议,必要时将通过预留邮箱与您保持联络。感谢您的支持!
意见/建议
提交建议

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

来源:恒创科技 编辑:恒创科技编辑部
2024-03-29 17:01:43
在RHEL 9中安装PostgreSQL 15和pgAdmin,首先启用EPEL仓库,然后使用yum命令安装postgresql15和pgadmin4。完成后,启动服务并设置开机启动。

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

1. 安装PostgreSQL 15

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服务

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

sudo dnf install y pgadmin4

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

sudo systemctl enable now pgadmin4

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

上一篇: linux如何设置ntp服务器 下一篇: 韩国服务器高性能计算:加速科学研究进程