yum方式安装ARM架构PostgreSQL10数据库

系统:

[root@weianvrgv /]# cat /etc/redhat-release

CentOS Linux release 8.2.2004 (Core)

 

安装中文字符集

[root@weianvrgv /]#yum install -y langpacks-zh_CN

 

设置中文字符

[root@weianvrgv /]#vi /etc/locale.conf

LANG="zh_CN.utf8"

 

安装PostgreSQL数据库(centos8默认安装的是10版本)

[root@weianvrgv /]#yum install postgresql*

 

切换用户

[root@weianvrgv /]#su - postgres

 

初始化

/usr/bin/postgresql-setup initdb

 

退出postgres用户

exit

 

编辑数据库配置文件

[root@weianvrgv /]#vi /var/lib/pgsql/data/postgresql.conf

listen_addresses = ‘*‘

 

[root@weianvrgv /]#vi /var/lib/pgsql/data/pg_hba.conf

大约在83行添加

host    all             all             0.0.0.0/0            md5

 

启动数据库

[root@weianvrgv /]#systemctl restart postgresql

 

切换用户

[root@weianvrgv /]#su - postgres

 

登录数据库

[postgres@weianvrgv ~]$psql

 

修改postgres密码

ALTER USER postgres WITH PASSWORD ‘postgres‘;

 

退出

\q

退出postgres用户

[postgres@weianvrgv ~]$exit

 

重启数据库

[root@weianvrgv /]#systemctl restart postgresql

 

现在PostgreSQL数据库可以远程登录,用户名:postgres 密码:postgres

 

yum方式安装ARM架构PostgreSQL10数据库

上一篇:mysql的分区


下一篇:sql--查询(多表,连接)