CentOS下yum安装PostgreSQL
Configure YUM repository
vim /etc/yum.repos.d/CentOS-Base.repo
[base] and [updates] sections添加:
exclude=postgresql*
Install PGDG RPM file
go http://yum.postgresql.org and find your correct RPM.
For example, to install PostgreSQL 9.3 on CentOS 6 64-bit:
打开 http://yum.postgresql.org/repopackages.php#pg93 后找到CentOS 6 - x86_64
then:
yum localinstall http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
Install PostgreSQL
list available packages:
yum list postgres*
For example, to install a basic PostgreSQL 9.3 server:
yum install postgresql93-server
yum install postgresql96-server
Other packages can be installed according to your needs.
配置
After installing the packages, a database needs to be initialized and configured.
PostgreSQL data directory(/var/lib/pgsql/9.3/data) contains all of the data files for the database.
[编辑]Initialize
The first command (only needed once) is to initialize the database:
service postgresql-9.3 initdb
正在初始化数据库: [确定]
或
/usr/pgsql-9.6/bin/postgresql96-setup initdb报错:
postgresql96-setup initdbFailed to get D-Bus connection: Operation not permittedyou're running a non-privileged container.还是别在docker里面玩了!docker run -d -e "container=docker" --privileged=true -v /sys/fs/cgroup:/sys/fs/cgroup --name pgsql centos /usr/sbin/initdocker exec -it pgsql /bin/bash
[编辑]Startup
开机启动:
chkconfig postgresql-9.3 on
service postgresql-9.3 start
centos7:
systemctl enable postgresql-9.6.servicesystemctl start postgresql-9.6.service
[编辑]艺搜参考
CentOS下yum安装PostgreSQL的更多相关文章
- centOS下yum安装配置samba
centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...
- centos下yum安装crontab+mysql自动备份
参考博文: centos下yum安装crontab yum install vixie-cron crontabs //安装 chkconfig crond on ...
- [转载]centos下yum安装samba及配置
centos下yum安装samba及配置 在我们使用 Windows 作为客户机的时候,通常有文件.打印共享的需求.作为Windows 网络功能之一,通常可以在 Windows 客户机之间通过Wind ...
- centos下yum安装lamp和lnmp轻松搞定
centos下yum安装lamp和lnmp轻松搞定.究竟多轻松你看就知道了.妈妈再也不操心不会装lamp了. 非常辛苦整理的安装方法,会持续更新下去.凡无法安装的在评论里贴出问题来,会尽快解决.共同维 ...
- centos 下yum 安装nginx
centos 下yum 安装nginx 1. 直接yum install nginx不行,要先处理下源: rpm -ivh http://nginx.org/packages/centos/6/noa ...
- CentOS下yum安装FFmpeg
一.yum安装FFmpeg 1. 最偷懒的方式就是yum安装了,自动解决依赖.不过CentOS系统默认无FFmpeg源,企业版 Linux 附加软件包EPEL源也不包含,需要手动添加yum源配置 ...
- CentOS下yum安装
centos最小化安装不会装yum,以下是安装方法:(所有操作均在ROOT用户下,系统版本是centos7) 一.删除原有YUM # rpm -aq|grep yum|xargs rpm -e --n ...
- Python - CentOS 下 yum 安装 python3
1. 概述 CentOS 7 自带 python2(python 以下正文简写为 py, 命令行中依然是 python) 尝试用 yum 安装 py3 2. 环境 os centos7 3. 步骤 1 ...
- CentOS下yum安装LAMP
1. 用yum安装Apache,Mysql,PHP. 1.1安装Apache yum install httpd httpd-devel 安装完成后,用/etc/init.d/httpd start ...
随机推荐
- CSS中:before和:after选择器的用法
在线演示这次给大家带来的是对话气泡效果,主要是演示了 :before / :after 和 border 的用法,赶快来围观吧. 阅读原文:CSS中:before和:after选择器的用法
- Project has no project.properties file! Edit the project properties to set one.
解决办法: 右击项目,选择android tools-->fix project properties.然后重启eclipse即可.
- 微信小程序 - 输入起点、终点获取距离并且进行路线规划(腾讯地图)
更新: 2018-9-19 腾讯官方经纬度转详细地址,详细地址转经纬度 index.wxml <!--地图容器--> <map id="myMap" style= ...
- Python 访问set
访问set 由于set存储的是无序集合,所以我们没法通过索引来访问. 访问 set中的某个元素实际上就是判断一个元素是否在set中. 例如,存储了班里同学名字的set: >>> s ...
- test推荐到极客头条002
test推荐到极客头条002test推荐到极客头条002test推荐到极客头条002test推荐到极客头条002test推荐到极客头条002test推荐到极客头条002test推荐到极客头条002te ...
- 通讯录结构体方法的实现 和VS中存在的一些问题的分析
实现一个通讯录: 通讯录能够用来存储1000个人的信息.每一个人的信息包含: 姓名.性别.年龄.电话.住址 功能例如以下: 1. 加入联系人信息 2. 删除指定联系人信息 3. 查找指定联系人信 ...
- Android开发之Google Map
2013-07-03 Google Map 提供三种视图: 1. 传统的矢量地图,提供行政区域.交通以及商业信息等. 2. 不同分辨率的卫星照片,与Google Earth 基本一样. 3. 地形地图 ...
- Linux中内存挂载到目录下
[日期:2012-11-14] /dev/shm是linux下的一块共享内存结构.默认大小是真实内存的一半.它用来存储进程间通讯时的一些共享数据结构.在物理内存足够时,会在内存中进行数据交换,如果 ...
- 前端异步文件上传组件 Uploader
Uploader是非常强大的异步文件上传组件,支持ajax.iframe.flash三套方案,实现浏览器的全兼容,调用非常简单,内置多套主题支持 和常用插件,比如验证.图片预览.进度条等,广泛应用于淘 ...
- assert 函数
assert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义: #include <assert.h> void assert( i ...