Postgresql源码安装
来源:互联网 发布:阿里云 虚拟主机 6元 编辑:程序博客网 时间:2024/05/21 15:22
一、安装流程
1, 下载源码解压
2, ./configure
3, make
4, make install
5, Useradd postgres
6, passwd postgres
7, mkdir /usr/local/pgsql/data
8, chown postgres /usr/local/pgsql/data
9, su – postgres “ - ” shell 环境的不同 与 su 是有区别的
10, /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
11, /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
12, /usr/local/pgsql/bin/createdb test
13, /usr/local/pgsql/bin/psql test
二、实际安装:
1、下载源码解压
tar jxvf postgresql-9.4.4.tar.bz2 或者tar zxvf postgresql-9.4.4.tar.gz
2、创建安装的目录
mkdir /opt/pgsql-9.4.4
3、进入解压后的目录
cd postgresql-9.4.4
4、进行安装 编译源码
./configure --prefix=/opt/pgsql-9.4.4
……
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.
提示这种错误。安装依赖包
[root@highgo postgresql-9.4.0]# yum install readline-devel
[root@highgo postgresql-9.4.0]# yum install zlib-devel
5、make
6、make install
安装完成
7、Useradd postgres
8、passwd postgres
9、配置环境变量
可以把下面的内容添加到UNIX用户的~/.bash_profile或~/.profile文件中,
[root@highgo postgresql-9.4.0]# su - postgres
[postgres@highgo ~]$ vi ~/.bash_profile
...#postgres
PGDATA=/usr/local/pgsql/data
PATH=/usr/local/pgsql/bin:$PATH
export PGDATAPATH
[postgres@highgo ~]$ source ~/.bash_profile
10、Initdb
- postgresql源码安装
- 源码安装postgresql
- 源码安装postgresql
- 源码安装postgresql
- 源码安装postgresql
- postgresql学习---源码安装
- postgresql源码包安装
- Postgresql源码安装
- 源码方式安装postgresql
- centos7源码安装postgresql
- postgresql源码安装__正确
- 源码安装 PostgreSQL 8.3.7
- FreeBSD从源码安装PostgreSQL
- CentOS从源码安装PostgreSQL
- CentOS下源码安装PostgreSQL
- linux + postgresql + postgis 源码 安装
- PostgreSql初探(1)-源码安装
- Postgresql 9.5.0源码安装
- HDFS 的Java操作“ Wrong FS: hdfs://xxx, expected: file:///”
- JAVA基础--TCP编程
- JAVA001对象导论02
- Java——基本语法(二)变量,常量,运算符,表达式
- acm英文题目
- Postgresql源码安装
- TPS和QPS区别
- js 函数定义,使用,作用域,变量声明提升,遇解析.....
- I/O复用------epoll
- 4Sum
- 实现智能硬件与移动app后台的服务器架构选择
- Closest Binary Search Tree Value II
- c#设计模式-单例模式
- 几种常见的Android自动化测试框架及其应用