源码安装 PostgreSQL 8.3.7
2009-05-15 06:41
363 查看
系统:Debian 5.01
提示 readline zlib 那就先装上吧
# apt-get install libreadline5-dev zlib1g-dev
重新config
# ./configure
这样安装在默认路径 /uer/local/pgsql
如果需要设置安装路径,比如 /opt/pgsql
# ./configure --prefix=/opt/pgsql
# make install
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
添加 psql 路径
PATH=/usr/local/pgsql/bin:$PATH
export PATH
# initdb -D /usr/local/pgsql/data
1. 下载源码
# wget ftp://ftp2.cn.postgresql.org/postgresql/source/v8.3.7/postgresql-8.3.7.tar.gz2. config
# ./configure提示 readline zlib 那就先装上吧
# apt-get install libreadline5-dev zlib1g-dev
重新config
# ./configure
这样安装在默认路径 /uer/local/pgsql
如果需要设置安装路径,比如 /opt/pgsql
# ./configure --prefix=/opt/pgsql
3. 编译后安装
# make# make install
4. 添加 PostgreSQL 用户 postgres , 设置数据路径
# adduser postgres# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
5. 设置环境变量
# vim /etc/profile添加 psql 路径
PATH=/usr/local/pgsql/bin:$PATH
export PATH
6. 初始化数据库
# su postgres# initdb -D /usr/local/pgsql/data
7. 启动数据库
# pg_ctl -D /usr/local/pgsql/data start相关文章推荐
- PostgreSQL每日一贴-从源码安装(9.4)
- 源码安装postgresql
- 通过源码编译安装PostgreSQL步骤及问题总结
- liunx环境下源码安装PostgreSQL+PostGIS
- Postgresql源码安装
- postgreSQL在redhat上的源码安装
- Postgresql 9.5.0源码安装
- CentOS6.5 64位下源码安装PostgreSQL9.5.1
- ubuntu源码安装postgresql(问题解决)转载
- centos7源码编译安装Postgresql9.6.2
- eclipse调试postgresql源码安装教程
- centos6源码安装postgresql 9.1.4
- postgresql源码包安装
- PostgreSQL源码学习之一:linux(fedora 14)下postgresql-9.0.0安装
- FreeBSD从源码安装PostgreSQL
- 源码安装postgresql
- linux下PostgreSQL数据库的源码安装
- CentOS下非root 源码安装PostgreSQL
- Linux CentOS 7 安装PostgreSQL 9.5(源码编译)
- 普通用户(非root非postgres)源码安装postgresql