redhat7.0安装postgresql
安装命令
sudo yum install postgresql-server
- 查看安装的包
sudo yum list postgres*
postgresql.x86_64
postgresql-contrib.x86_64
postgresql-libs.x86_64
postgresql-server.x86_64
sudo su -c " PGSETUP_INITDB_OPTIONS='-U postgres -E UTF8 --locale=zh_CN.UTF-8' postgresql-setup initdb"
Initializing database ... OK
sudo systemctl enable postgresql
/etc/systemd/system/multi-user.target.wants/postgresql.service
sudo systemctl start postgresql
- 切换账号,登录psql
sudo su postgres
psql
至此, postgresql安装完成!
- 使用密码认证,在初始化时考虑加入:
PGSETUP_INITDB_OPTIONS = '-auth-host=md5 …'或者修改
sudo sed -r -i 's/^(host.*)(ident)/\1md5/g' /var/lib/pgsql/data/pg_hba.conf
数据库配置
- 登录数据库
sudo su postgres
psql
- 设置密码、账号
postgres=# \password postgres
postgres=# create user keke_zhaokk with password '密码';
postgres=# create database exampledb owner keke_zhaokk;
postgres=# grant all privileges on database exampledb to keke_zhaokk;
postgres=# \q
- 用账号密码登录
psql -U postgres -h 127.0.0.1 -p 5432
psql -U keke_zhaokk -d exampledb -h 127.0.0.1 -p 5432
redhat7.0安装postgresql的更多相关文章
- redhat7.0安装ifconfig
问题描述: Setup is unable to find the "ifconfig" program on your machine. Please make sure it ...
- centos6.4下面安装postgresql以及客户端远程连接
一.安装 centos6.4服务器IP:192.168.220.131 window7客户端IP:192.168.199.218 在centos官网http://www.postgresql.org/ ...
- Linux CentOS安装postgresql 9.4
一.前言 PostgreSQL通常也简称Postgres,是一个关系型数据库管理系统,适用于各种Linux操作系统.Windows.Solaris.BSD和Mac OS X.PostgreSQL遵循P ...
- centos 6.4下安装postgresql 9.2
我的linux版本是centos 6.4 ,准备安装postgresql 9.2 根据官方说明: http://www.postgresql.org/download/linux/redhat/ 缺省 ...
- 安装postgreSQL出现configure:error:readline library not found解决方法
要安装 readline , readline-dev 开发包,要么使用 --without-readline 选项关闭 readline 功能. #yum install readline; #yu ...
- [zz]安装PostgreSQL数据库(Linux篇)
0.编译环境 Linux: CentOS 5.5 gcc: 4.1.2 1. 安装PostgreSQL 1) 解压postgresql-9.1.7.tar.bz2 #tar jxvf postgres ...
- zabbix 3.0 安装
zabbix3.0安装注意: 1.PHP要5.4版本以上 2.防火墙关闭 3.selinux关闭 注:本操作系统为centos 6.5 X86 操作步骤 一.安装PHP 添加 epel 源 # r ...
- 在CentOS上编译安装PostgreSQL
http://my.oschina.net/tashi/blog 第一步:准备阶段 获取必需软件包: CentOS中查看是否安装了某个软件的命令:rpm -qa | grep 软件名.which命令可 ...
- Windows Azure上的Odoo(OpenERP)-1.创建Ubuntu虚拟机,安装PostgreSQL 数据库
前提是您必须拥有Windows Azure的账号,如果没有的话,可以去Windows Azure 中国区网站申请免费试用账号.哈哈,我就是第一批申请的试用账号,感觉自己挺幸运的.申请的过程就不写了,请 ...
随机推荐
- POJ 2632:Crashing Robots
Crashing Robots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8424 Accepted: 3648 D ...
- POJ 2586:Y2K Accounting Bug
Y2K Accounting Bug Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11297 Accepted: 56 ...
- vs使用opencv总提示igdrclneo64.dll异常.exe: 0xC0000005:的解决方法
最近项目中要使用opencv库,搭建好环境,使用接口的时候,总提示 igdrclneo64.dll报错崩溃,一直怀疑是自己程序的问题,后面经过一系列的查资料才解决 解决办法: 本地环境:vs2015+ ...
- 65.ORM查询条件:gte,gt,lte和lt的使用
1. gte: 代表的是大于等于,英文全称为:great than equal.举例:找到文章id大于等于3等文章,示例代码如下: 定义模型的示例代码如下: from django.db import ...
- DES与MD5加密
using System; using System.Data; using System.Configuration; using System.Web; using System.Security ...
- <kotlin>基础,杂七杂八(亲测有效)
okhttp class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) ...
- CCCC 连续因子
题意: 一个正整数N的因子中可能存在若干连续的数字.例如630可以分解为3*5*6*7,其中5.6.7就是3个连续的数字.给定任一正整数N,要求编写程序求出最长连续因子的个数,并输出最小的连续因子序列 ...
- HTML5新标签使用及CSS选择器(伪类)
这些标签能够让搜索引擎更直接的解析页面内容. <header></header>语义:文档或者页面的头部 <nav></nav>语义:导航这两者不是组合 ...
- Maven:maven依赖jar包冲突处理
Maven多模块项目中偶尔会遇到这种问题:明明项目中相关的jar包已经通过pom.xml引进来了,还是报错找到不到相关的类的错误.这种时候,基本上可以断定是jar包冲突的问题. 很多情况下jar包会通 ...
- Python说文解字_Python之多任务_02
第三部分:Semaphore控制进入数量的锁 有时候可能需要运行多个工作线程同时访问一个资源,但要限制总数.例如,连接池支持同时连接,但是数目可能是固定的,或者一个网络应用可能支持固定数据的并发下载. ...