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 ...
随机推荐
- Maven 下载安装
http://www.runoob.com/maven/maven-tutorial.html https://www.yiibai.com/maven/ Maven 提倡使用一个共同的标准目录结构, ...
- go语言字符串练习
package main import "fmt" import s"strings" var p = fmt.Println func main() { p( ...
- windows 与 Linux SOCKET通讯
windows client 端口 // Def_win_client_socket_test.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" ...
- wifi功能模块
1. API 10 Android2.3.3 不支持wifi代理设置. 2017-09-29 原来addOrUpdateNetwork之前,wifi配置并不会立即生效,要想立即生效,就要 wifiMa ...
- jdom解析xml
这次把代码整理了一下,打包发上来了,程序中需要用到的jar包也一起打在里面了,有兴趣的朋友可以解压后直接导入的eclipse里运行! xml是一种广为使用的可扩展标记语言,java中解析xml的方式有 ...
- MVVM Light 笔记
4.关于子视图, MVVMLight Using Two Views:http://www.codeproject.com/Articles/323187/MVVMLight-Using-Two-Vi ...
- JS高级- OOP-ES5
1. OOP 面向对象三大特点: 封装,继承,多态 封装: 问题: 构造函数可重用代码和结构定义,但无法节约内存 为什么: 放在构造函数内的方法定义,每new一次,都会反复创建副本——浪费内存 解决: ...
- NYOJ 1016 判断两线段是否相交
#include<cstdio> #include<cmath> #include<iostream> #include<algorithm> #inc ...
- 2019.01.26 codeforces 1096G. Lucky Tickets(生成函数)
传送门 题意简述:现在有一些号码由000~999中的某些数字组成(会给出),号码总长度为nnn,问有多少个号码满足前n2\frac n22n个数码的和等于后n2\frac n22n个数码的和(保证 ...
- Amount of Degrees(数位dp)
题目链接:传送门 思路:考虑二进制数字的情况,可以写成一个二叉树的形式,然后考虑区间[i……j]中满足的个数=[0……j]-[0……i-1]. 所以统计树高为i,中有j个1的数的个数. 对于一个二进制 ...