centos安装postgresql
#安装postgresql
yum -y install postgresql-server
#执行数据库初始化脚本
service postgresql-9.2 initdb
#启动服务
service postgresql-9.2 start
# 变更登录用户
su - postgres
# 登录数据库,修改postgres用户的数据库密码
psql
postgres=# ALTER USER postgres PASSWORD '123456';
postgres=# \q
# 退出变更登录
exit
# 编辑配置文件,配置可访问数据库的网络地址
(注意别忘了去掉#listen_addresses=前面的#)
vi /var/lib/pgsql/9.2/data/postgresql.conf
listen_addresses = '*'
# 编辑配置文件,设置密码md5验证
vi /var/lib/pgsql/9.2/data/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
#host all all 127.0.0.1/32 ident
host all all 0.0.0.0/0 md5
# 重启数据库服务
service postgresql-9.2 restart
# 设置开机自动启动服务
chkconfig postgresql-9.2 on
centos安装postgresql的更多相关文章
- CentOS 安装postgresql
CentOS 安装postgresql 添加postgresql官网安装源 在/etc/yum.repos.d目录下新建pgdg-10-centos.repo 文件 [pgdg10] name=P ...
- Linux CentOS安装postgresql 9.4
一.前言 PostgreSQL通常也简称Postgres,是一个关系型数据库管理系统,适用于各种Linux操作系统.Windows.Solaris.BSD和Mac OS X.PostgreSQL遵循P ...
- CentOS安装postgresql 9.4
第一步:在CentOS6.5下安装Postgresql 1. 安装PostgreSQL源 # yum install http://yum.postgresql.org/9.4/redhat/rhel ...
- 阿里云CentOS安装PostgreSQL
在PostgreSQL官方文档:https://www.postgresql.org/download/linux/redhat/ 有选项和说明 1.检查有没安装:rpg -ga | grep pos ...
- centos 安装postgresql 完整版
按步骤 执行命令即可: yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-c ...
- CentOS安装SonarQube7.9.1
1.准备 SonarQube版本:sonarqube-7.9.1.zip,官网地址:https://www.sonarqube.org/downloads/ jdk版本:jdk-11.0.4_linu ...
- centos 6.4下安装postgresql 9.2
我的linux版本是centos 6.4 ,准备安装postgresql 9.2 根据官方说明: http://www.postgresql.org/download/linux/redhat/ 缺省 ...
- 在CentOS上编译安装PostgreSQL
http://my.oschina.net/tashi/blog 第一步:准备阶段 获取必需软件包: CentOS中查看是否安装了某个软件的命令:rpm -qa | grep 软件名.which命令可 ...
- CentOS下PostgreSQL的安装与配置
一.CentOS下PostgreSQL的yum安装: #安装yum源,默认源存在对版本的支持不好,下载不到等等问题. yum install http://yum.postgresql.org/9.5 ...
随机推荐
- centos 搭建ntp
str=$(printf "%-25s" "*") echo -e "${str// /*}" echo -e "*\t\t\t* ...
- VirtualBox安装部署的Ubuntu16.04的步骤
1.下载ubuntu16.04镜像 http://cn.ubuntu.com/download/ 以及虚拟机软件VirtualBox https://www.virtualbox.org/wiki/D ...
- windows下phpstorm的常用快捷键及使用技巧
1.pubf+回车 声明一个方法 2./ ** 回车 生成注释 3.Ctrl +g 跳转行 4.Ctrl + Alt + L 代码格式化 5.Ctrl +D 复制当前行到下一行 6.Ctrl ...
- AC日记——The Child and Sequence codeforces 250D
D - The Child and Sequence 思路: 因为有区间取模操作所以没法用标记下传: 我们发现,当一个数小于要取模的值时就可以放弃: 凭借这个来减少更新线段树的次数: 来,上代码: # ...
- 在C#中将金额转换成中文大写金额
具体代码如下: /// <summary> /// 金额转换成中文大写金额 /// </summary> /// <param name="LowerMoney ...
- iis日志详解
c-客户端操作.cs-客户端到服务器的操作.sc-服务器到客户端的操作. s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-que ...
- Codeforces Round #444 (Div. 2)A. Div. 64【进制思维】
A. Div. 64 time limit per test 1 second memory limit per test 256 megabytes input standard input out ...
- HDU1010 Tempter of the Bone(回溯 + 剪枝)
本文链接:http://i.cnblogs.com/EditPosts.aspx?postid=5398734 题意: 输入一个 N * M的迷宫,这个迷宫里'S'代表小狗的位置,'X'代表陷阱,‘D ...
- SOAP、SOCKET协议
一.SOAP( SOAP:Simple Object Access Protocol) 简单对象访问协议,简单对象访问协议(SOAP)是一种轻量的.简单的.基于 XML 的协议,它被设计成在 WEB ...
- 2017 China Collegiate Programming Contest Final (CCPC 2017)
题解右转队伍wiki https://acm.ecnu.edu.cn/wiki/index.php?title=2017_China_Collegiate_Programming_Contest_Fi ...