fedora安装postgresql
1. 安装:postgresql-server pgadmin程序
sudo yum install postgresql-server.x86_64
sudo yum install pgadmin3.x86_64
2. 初始化数据库与启动服务
Fedoar 20
postgresql-setup initdb
systemctl enable postgresql.service
Centos
## Start PostgreSQL 9.2 ##
service postgresql-9.2 start
## OR ##
/etc/init.d/postgresql-9.2 start ## Start PostgreSQL 9.2 on every boot ##
chkconfig --levels postgresql-9.2 on
3. 设置数据库
注:可以使用ps -aux | grep postsql 在进程列表中查找pg_hba.conf文件,因为不同的系统pg_hba.conf路径不一样。
设置为可以使用密码登录。修改/usr/lib/pqsql/data/pg_hba.conf, 将以下两条的METHOD 修改为md5,默认将ident。保存并重起服务。sudo service postgreql restart
# for users connected via local IPv4 or IPv6 connections, always require md5
local all all md5
4. 创建数据库,添加新用户
切换到postgres用户
sudo su postgres
创建数据库
createdb {db-name}
登录新建的数据库(使用postgres用户)
psql {db-name}
新建用户,角色为超级用户,并设置密码
CREATE ROLE {user-name} WITH SUPERUSER LOGIN PASSWORD '{user-password}';
测试新建的用户(在普通用户状态下)
psql -h localhost -U {user-name} {db-name}
引用:
http://www.if-not-true-then-false.com/2012/install-postgresql-on-fedora-centos-red-hat-rhel/
fedora安装postgresql的更多相关文章
- 在Fedora中安装PostgreSQL并配置密码和开启远程登陆
在Fedora中安装PostgreSQL并配置密码 首先先放出官方的文档教程 :https://fedoraproject.org/wiki/PostgreSQL 我写的内容其实也八九不离十,站在一个 ...
- [PostgreSQL] 图解安装 PostgreSQL
图解安装 PostgreSQL [博主]反骨仔 [原文地址]http://www.cnblogs.com/liqingwen/p/5894462.html 序 园友的一篇<Asp.Net Cor ...
- 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 ...
- CentOS6.5下安装PostgreSQL
一.配置 YUM 仓库 修改原始的 yum 仓库配置: vim /etc/yum.repos.d/CentOS-Base.repo 在[base]和[updates] 节(section)部分的尾部插 ...
- 1.Windows安装PostgreSQL
按照下面的步骤,Windows机器上安装PostgreSQL.请确保已开启第三方防病毒,同时安装. 挑选你想要的PostgreSQL的版本号,可以点击以下链接下载 EnterpriseDB Windo ...
- 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 ...
- ubuntu安装postgresql与postgis
版本信息 ubuntu 14.04.1LTS postgresql 9.3.5 postgis 2.1.2 今天尝试着安装了postgis 2.1.2,(较简便的包安装,不是源码 ...
随机推荐
- C#动态引用DLL的方法
C#编程中,使用dll调用是经常的事,这样做的好处是非常多的,比如把某些功能封装到一个dll中,然后主程序动态调用这个dll. 废话不多说,举例说明如下. 首先,我们需要封装一个dll,vs2008下 ...
- Codeforces Round 190 div.2 322C 321A Ciel and Robot
唔...这题是数学题. 比赛时做出来,但题意理解错了,以为只要判断那点是不是在线上就行了,发现过不了样例就没提交. 思路:记录每一步的偏移,假设那点是在路径上的某步,然后回推出那一个周期的第一步,判断 ...
- LeetCode 268
Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one ...
- 2013 南京理工大学邀请赛B题
思路: 每次枚举删除一个点,然后对剩下的点求出关键点,判断删除哪个关键点获得的连通分支数最大. #include<iostream> #include<cstdio> #inc ...
- IIS设置允许下载.exe文件解决方法(转)
最近很多客户使用IIS服务器,然后提示返现宝下载无法找到等无法下载的问题. 返现宝是.exe安装文件,部分服务器或主机可能无法下载. 第一.如果是自己服务器或VPS请按如下设置: 1.设置MIME,让 ...
- ZooKeeper(3.4.5) - 开源客户端 Curator(2.7.0) 的简单示例
一.创建会话 1. 创建会话 package com.huey.dream.demo; import org.apache.curator.framework.CuratorFramework; im ...
- Delphi IP 控件源码
interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,ComCtrls, Co ...
- asp.net中Repeater控件用法笔记
大家可能都对datagrid比较熟悉,但是如果在数据量大的时候,我们就得考虑使用 repeater作为我们的数据绑定控件了.Repeater控件与DataGrid (以及DataList)控件的主要区 ...
- Objective-c中的对象间的消息传递以及消息路由
刚开始使用Objective-C时,总是习惯将对象间发送消息之间称呼为方法调用.心想,这和c#不是一回事吗?不就是调用实例方法吗,还搞个消息发送作甚,最后还不是要转化为方法的调用?通过一段时间的理解学 ...
- IO&Seralize
IO <appSettings> <!--日志路径--> <add key="LogPath" value="E:\学习\C#进阶\fsoc ...