Centos 7 安装 PostgreSQL PGAdmin4
本文只讲PostgreSQL在CentOS 7.x 下的安装,其他系统请查看:https://www.postgresql.org/download
PostgreSQL 所用版本为:PostgreSQL 10
1.安装存储库
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
2.安装客户端
yum install postgresql10
3.安装服务端
yum install postgresql10-server
4.验证是否安装成功
rpm -aq| grep postgres
输出如下:
4.初始化数据库
/usr/pgsql-10/bin/postgresql-10-setup initdb
5.启用开机自启动
systemctl enable postgresql-10
systemctl start postgresql-10
6.配置防火墙
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
7.修改用户密码
su - postgres 切换用户,执行后提示符会变为 '-bash-4.2$'
psql -U postgres 登录数据库,执行后提示符变为 'postgres=#'
ALTER USER postgres WITH PASSWORD 'postgres' 设置postgres用户密码为postgres
\q 退出数据库
8.开启远程访问
vim /var/lib/pgsql/10/data/postgresql.conf
修改#listen_addresses = 'localhost' 为 listen_addresses='*'
当然,此处‘*’也可以改为任何你想开放的服务器IP
9.信任远程连接
vim /var/lib/pgsql/10/data/pg_hba.conf
修改如下内容,信任指定服务器连接
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.157.1/32(需要连接的服务器IP,如果是所有则0.0.0.0/0) trust
10.重启服务
systemctl restart postgresql-10
11.使用DBMS软件连接
这里使用的是Navicat
连接成功:
安装 PGAdmin4:
1:yum -y install epel-release
2.yum install pgadmin4
3./usr/pgadmin4/bin/pgadmin4-web-setup.sh
4.
cd /usr/lib/python2.7/site-packages/pgadmin4-web/
5.python /usr/lib/python2.7/site-packages/pgadmin4-web/pgAdmin4.py
Centos 7 安装 PostgreSQL PGAdmin4的更多相关文章
- Linux CentOS 7 安装PostgreSQL 9.5.17 (源码编译)
近日需要将PostgreSQL数据库从Windows中迁移到Linux中,Linux CentOS 7 安装PostgreSQL 9.5.17 安装过程 特此记录. 安装环境: 数据库:Postgre ...
- CentOS 7 - 安装PostgreSQL
一,用yum安装PostgreSQL . 选择安装版本和服务器平台后,执行安装命令,例如我要安装是9.6版本,平台是CentOS 7. https://www.postgresql.org/downl ...
- CentOS下安装postgresql
一.说明 postgresql版本:9.4.1 安装包: postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm postgresql94-libs-9.4. ...
- 阿里云服务器 centos 7 安装postgresql 11
Postgresql简介 官方网站:https://www.postgresql.org/ 简介参考zhihu文章 https://www.zhihu.com/question/20010554 关于 ...
- CentOS 6安装PostgreSQL
https://zh.wikipedia.org/wiki/PostgreSQL PostgreSQL是自由的对象-关系型数据库服务器(数据库管理系统),在灵活的BSD-风格许可证下发行.它在其他开放 ...
- Centos 7 安装 PostgreSQL
本文只讲PostgreSQL在CentOS 7.x 下的安装,其他系统请查看:https://www.postgresql.org/download PostgreSQL 所用版本为:PostgreS ...
- centos 7安装postgresql10.3
最新版本安装请移步:阿里云服务器 centos 7 安装postgresql 11 一.Postgresql简介 官方网站:https://www.postgresql.org/ 简介参考zhihu文 ...
- Linux 安装 PostgreSQL
Linux 安装 PostgreSQL CentOS 7 安装 PostgreSQL 10 步骤 官网安装步骤,选择服务器和数据库版本,会给出相应的安装命令 # 安装 yum install -y h ...
- Linux CentOS安装postgresql 9.4
一.前言 PostgreSQL通常也简称Postgres,是一个关系型数据库管理系统,适用于各种Linux操作系统.Windows.Solaris.BSD和Mac OS X.PostgreSQL遵循P ...
随机推荐
- Servlet会话管理三(HttpSession)
Session是服务器端技术,服务器在运行时可以为每一个用户的浏览器创建一个其独享的HttpSession对象.由于Session为浏览器用户所独享,所以用户在访问服务器的web资源时,可以把各自的数 ...
- Spring 是如何解析泛型 - ResolvalbeType
Spring 是如何解析泛型 - ResolvalbeType Spring 系列目录(https://www.cnblogs.com/binarylei/p/10198698.html) Java ...
- 设计服务类网站原型模板分享——Fortyseven
Fortyseven是一个设计服务网站,设计理念是帮助企业设计出赚钱的品牌和网站.该网站图文排版配色都很不错,很有欧美复古风,多采用大图结合文案排版. 本原型由国产Mockplus(原型工具)和iDo ...
- 初学者问题一oracle
问:(待解决)如何将纵向表改成横向表? (待解决)如何实现对大型数据范围差距不大的索引?(建什么索引树)
- about CSS3
1. 1.transition 语法:transition:[ transition-property ] || [ transition-duration ] || [ transition-tim ...
- python之面向对象篇6
一.继承与派生 什么是继承 继承一种新建类的方式,新建的类称为子类或者派生类,被继承的类称为父类或基类或超类 子类会遗传父类的一系列属性 python支持多继承 注意: 在python3中,如果没有显 ...
- delphi 中的win32 以外到平台的字符串处理一定慢吗?(转载)
原始连接:http://rvelthuis.blogspot.tw/2018/01/strings-on-other-platforms-than-32-bit.html Strings too sl ...
- Elastic serarch 安装
1.安装 1.1下载最新的 elasticsearch-6.5.4.tar.gz 1.2解压 tar -zxvf elasticsearch-6.5.4.tar.gz 1.3 创建用户 elastic ...
- Basic Router Architecture
from the book principles and practices of interconnection networks the chapter router architecture ...
- Mybatis在oracle数据库中插入数据后返回自增值ID
1.将id设置成自增序列 CREATE OR REPLACE TRIGGER "DATALIB"."TRIG_USER_ADD" BEFORE INSERT O ...