惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - hyamw

【转】代码审查工具fisheye/crucible安装及破解 Win11单语言系统添加美式键盘的方法 Unity中AndroidJavaProxy方法参数为null的坑 CentOS下安装dotnet tools工具报错 (转)支持 PS/2 与 USB 的键盘过滤驱动(可卸载) Unity编辑器扩展-Custom List, displaying data your way 值得推荐的C/C++框架和库 (真的很强大)〔转〕 SIGGRAPH2016【转】 在64位windows下使用instsrv.exe和srvany.exe创建windows服务[转] VS2015调试UWP程序时提示错误DEP0700 : Registration of the app failed. Another user has already installed Unity 4.x Asset Bundle 重名 VC++ Debugger Tips[转] CentOS 访问Windows7共享文件夹 svn+ssh方式svn服务器和客户端的配置[转载] 利用Ptrace在Android平台实现应用程序控制[转] AS3地图拼接与战争迷雾的实现[转载] 一些游戏开发相关资料(收集) Bit Twiddling Hacks[转] Unity3D实用工具汇总[转]
centos下postgresql的安装与配置[转]
hyamw · 2013-08-22 · via 博客园 - hyamw

本文摘自:http://blog.chinaunix.net/uid-24846094-id-78490.html

一、安装(以root身份进行)

1、检出最新的postgresql的yum配置从http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html

然后根据版本选择需要的rpm后执行下列命令

rpm -Uvh http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-6.noarch.rpm

2、安装或者升级postgresql-libs

yum upgrade postgresql-libs

3、安装postgresql

yum install postgresql postgresql-server

4、初始化数据库以及启动服务

service postgresql initdb

service postgresql start

二、配置

在配置之前需将postgresql的端口号5432在iptables下开放。

开放方法参考:http://blog.csdn.net/ivan820819/archive/2009/02/03/3860163.aspx

yum安装postgresql后的安装路径为:/var/lib/pgsql下,主要配置文件在其data文件夹下,进入data文件夹

1、修改postgresql.conf文件

如果想让PostgreSQL监听整个网络的话,将listen_addresses前的#去掉,并将listen_addresses = 'localhost'改成listen_addresses = '*'

2、修改pg_hba.conf

这个文件最后有一个列表,它决定了分派了每一个用户的权限,以及认证方式。格式是“Type Database User Address Method”,要注意的是method最好写md5。

在列表后追加一行:host    all         all         192.168.1.0/24        password

3、修改postgres用户密码:passwd postgres

4、暂时将pg_hba.conf中,本机的认证方式改为trust,切换当前用户为postgres:su postgres

5、用psql登录PostgreSQL系统,“SELECT * FROM pg_shadow;”,发现这个表里的postgres这个用户根本还没有存储密码;于是,再“ALTER USER postgres PASSWORD '它的密码';

6、重启服务/etc/init.d/postgresql restart,连接成功。

参考

http://www.surfybeach.net/blog/archives/29

http://blog.csdn.net/nicky_zs/archive/2008/12/27/3618705.aspx

https://public.commandprompt.com/projects/pgcore/wiki