手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

Centos7安装PostgreSQL方法

时间:2024-10-14 00:45:11

1、确认操作系统的版本

Centos7安装PostgreSQL方法

2、操作系统是centos7 64位,安装对应的postgres孥恶膈茯ql yum源rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm

Centos7安装PostgreSQL方法

3、yum update更新完成之后操作系统变成了最新版本的7.4

Centos7安装PostgreSQL方法

4、执行安装命令yum install postgresql94-server postgresql94-contrib

Centos7安装PostgreSQL方法

5、检查是否安装成功[root@client ~]# rpm -qa| grep postgrespostgresql94-libs-9.4.15-1PGDG.rhe造婷用痃l7.x86_64postgresql94-server-9.4.15-1PGDG.rhel7.x86_64postgresql94-9.4.15-1PGDG.rhel7.x86_64postgresql94-contrib-9.4.15-1PGDG.rhel7.x86_64

Centos7安装PostgreSQL方法

6、初始化数据库/usr/pgsql-9.4/bin/postgresql94-setup initdb

Centos7安装PostgreSQL方法

7、启动服务并设置为开机启动systemctl enable postgresql-9.4systemctl start postgresql-9.4

Centos7安装PostgreSQL方法

8、访问PostgreSQLsu - postgres输入命令psql将看到PostgrSQL的版本信息

Centos7安装PostgreSQL方法

9、设置postgres用户密码postgres=# \password postgresEnter new password:Enter it again:postgres=#

Centos7安装PostgreSQL方法
© 手抄报圈