postgresql 在linux上的源码安装
http://my.oschina.net/hippora/blog/375292
下载源码并解压
[root@fnddb ~]# wget https://ftp.postgresql.org/pub/source/v9.4.0/postgresql-9.4.0.tar.bz2
[root@fnddb ~]# tar -xjvf postgresql-9.4.0.tar.bz2
[root@fnddb ~]# cd postgresql-9.4.0
开始编译安装
[root@fnddb postgresql-9.4.0]# ./configure
……
checking for library containing shmget... none required
checking for library containing readline... no
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.
按照错误提示依次安装依赖包
[root@fnddb postgresql-9.4.0]# yum install readline-devel
[root@fnddb postgresql-9.4.0]# yum install zlib-devel
...
继续
[root@fnddb postgresql-9.4.0]# ./configure
[root@fnddb postgresql-9.4.0]# make
……
All of PostgreSQL successfully made. Ready to install.
[root@fnddb postgresql-9.4.0]# make install
……
PostgreSQL installation complete.
添加用户
[root@fnddb postgresql-9.4.0]# useradd postgres
[root@fnddb postgresql-9.4.0]# passwd postgres
Changing password for user postgres.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
建立好database cluster目标文件夹
[root@fnddb postgresql-9.4.0]# mkdir /var/lib/pgsql/data -p
[root@fnddb postgresql-9.4.0]# chown -R postgres /var/lib/pgsql
环境变量设置
[root@fnddb postgresql-9.4.0]# su - postgres
[postgres@fnddb ~]$ vi .bash_profile
…
# postgres
PGDATA=/var/lib/pgsql/data
PATH=/usr/local/pgsql/bin:$PATH
export PGDATA PATH
[postgres@fnddb ~]$ . .bash_profile
创建database cluster
[postgres@fnddb ~]$ pg_ctl initdb
......
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/local/pgsql/bin/postgres -D /var/lib/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
启动数据库实例
设置好PGDATA环境变量后,可以不带-D选项
[postgres@fnddb ~]$ pg_ctl start -l /var/lib/pgsql/pgsql.log
server starting
关闭数据库实例
[postgres@fnddb ~]$ pg_ctl stop
waiting for server to shut down.... done
server stopped
开机自动启动设置
[root@fnddb postgresql-9.4.0]# vi /etc/rc.local
…
su - c '/usr/local/pgsql/bin/pg_ctl start -D /var/lib/pgsql/data -l /var/lib/pgsql/pgsql.log'
postgresql 在linux上的源码安装的更多相关文章
- Linux平台下源码安装mysql多实例数据库
Linux平台下源码安装mysql多实例数据库[root@linux-node1 ~]# netstat -tlunp | grep 330tcp6 0 0 :::3306 :::* LISTEN 6 ...
- 在 Ubuntu 上使用源码安装 OpenResty
镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 本文将介绍如何在 Ubuntu 上使用源码安装 OpenResty. 目标 Ubuntu 18.04 OpenResty 1.19.3.2 安装依 ...
- Linux 6.8 源码安装MySQL8.0
搭建环境说明: 系统版本:Red Hat Enterprise Linux Server release 6.8 (Santiago) 内核版本:Linux 2.6.32-642.el6.x86_64 ...
- linux中的源码安装
前两天自己在笔记本上装了CentOs版本的虚拟机,接着要装Python3,是源码安装的挺费劲,个人总结了一些源码安装的经验,今天在这里给大家分享一下. 1. 首先准备环境,安装必要的编译工具gcc g ...
- Linux环境下源码安装PostgreSQL
1.下载PostgreSQL源码包,并保存到Linux操作系统的一个目录下 2.解压PostgreSQL源码包 :tar zxvf postgresql-9.2.4.tar.gz 或 tar jxvf ...
- linux下python3源码安装及卸载
Linux下Python3的源码编译安装和卸载方法 [日期:2019-06-21] 来源:博客园 作者:wuli潇萧 [字体:大 中 小] (一)Linux下软件的源码编译安装和卸载方法 L ...
- Linux MySQL5.5源码安装
环境:CentOS7,MySQL5.5 1.MySQL5.5源码下载 Oracle的网站打开较慢,http://mirrors.sohu.com/mysql/这里提供了MySQL的镜像.一般的,Lin ...
- [整理]Linux下的源码安装步骤及其功能解释
源码的安装一般由3个步骤组成:配置(./configure).编译(make).安装(make install). 这时最常用的命令就是这三个--./configure && make ...
- linux nginx+php源码安装
PHP安装 1)下载 wget http://cn2.php.net/distributions/php-5.6.30.tar.gz 2)解压 tar –xf php-5.6.30 3)进入目录 cd ...
随机推荐
- JVM问题诊断常用命令:jinfo,jmap,jstack
1.jinfo 描述:输出给定 java 进程所有的配置信息.包括 java 系统属性和 jvm 命令行标记等. 用法: jinfo [ option ] pid jinfo [ option ] e ...
- IntelliJ IDEA 13.1.4新建java web项目
打开软件
- Weblogic的集群
<收藏自http://www.cnblogs.com/HondaHsu/p/4267972.html> 一.Weblogic的集群 还记得我们在第五天教程中讲到的关于Tomcat的集群吗? ...
- matlab显示原图和灰度直方图
**只会显示灰度直方图I = imread('*.bmp') %图必须是灰度图,或者转换为灰度图I=rgb2gray(I);imshow(I);imhist(I); **同时出现在一个平面上I = i ...
- 了解Sql
什么是数据库: 数据库是一个以某种有组织的方式存储的数据集合,也可以理解为有组织的数据的容器.数据库相当于文件柜. 表相当于文件柜中的抽屉,表用来存储资料,一个数据库中的表必须唯一. 列,表中的一个字 ...
- HDU 4381 Grid
背包变形. 将操作分为了两类,可以分开处理. 可以dp处理出L[i]:L[i]=-1代表从左到右 i 长度不能被拼凑出来,L[i]!=-1表示从左到右 i 长度能被拼凑出,并且最小费用为L[i]. 反 ...
- Linux系统采用netstat命令查看DDOS攻击的方法
Linux系统采用netstat命令查看DDOS攻击的方法 来源:互联网 作者:佚名 时间:07-05 15:10:21 [大 中 小] 这篇文章主要为大家介绍了Linux系统采用netstat命令查 ...
- 禁止 一些地区的ip用户访问 网站
01 framework.php 中 获取请求的ip地址.保存为常量 define('IP', request::get_clientip()); 02 setting表中.属于system模块,保存 ...
- spark第一篇--简介,应用场景和基本原理
摘要: spark的优势:(1)图计算,迭代计算(2)交互式查询计算 spark特点:(1)分布式并行计算框架(2)内存计算,不仅数据加载到内存,中间结果也存储内存 为了满足挖掘分析与交互式实时查询的 ...
- dip2px
package com.itheima.zhbj.utils; import android.content.Context; public class DensityUtils { public s ...