Home > Database > Mysql Tutorial > CentOS平台下安装PostgreSQL9.3

CentOS平台下安装PostgreSQL9.3

WBOY
Release: 2016-06-07 16:49:07
Original
1073 people have browsed it

Linux系统:CentOS 1 用root登入系统,下载postgresql9.3,解压缩,进入解压缩后的postgresql目录 2 编译、安装 #pwd #./configu

Linux系统:CentOS

1 用root登入系统,,下载postgresql9.3,解压缩,进入解压缩后的postgresql目录
 
2 编译、安装
 #pwd
 #./configure --profix=/usr/local/pgsql
 (可能会报错,需安装gcc、readline、readline-devel、zlib等依赖包,用yum去装即可)
 #make
 #make install
 
3 创建用户及组
 #groupadd postgres
 #useradd -g postgres postgres
 
4 环境设置
 #mkdir /usr/local/pgsql/data
 #chown postgres:postgres -R /usr/local/pgsql/data
 #su - postgres
 $vim .bash_profile
 添加:
 PGHOME=/usr/local/pgsql
 PGDATA=$PGHOME/data
 PATH=$PATH:$HOME/bin:$PGHOME/bin
 export PGHOME
 export PGDATA
 export PATH
 $source .bash_profile
 
5 初始化数据库
 $initdb -D $PGDATA
 
6 系统服务配置及开机自动启动
 #cd /root/postgresql-9.3.1
 #cp contrib/start-scripts/linux /etc/init.d/postgresql
 #chmod +x /etc/init.d/postgresql
 #service postgresql status--(start | stop)
 
#chkconfig --add postgresql
 #chkconfig postgresql on
 
7 配置监听地址及端口
 $vim $PGDATA/postgresql.conf
 $vim $PGDATA/pg_hba.conf

PostgreSQL缓存详述

Windows平台编译 PostgreSQL

Ubuntu下LAPP(Linux+Apache+PostgreSQL+PHP)环境的配置与安装

Ubuntu上的phppgAdmin安装及配置

PostgreSQL 的详细介绍:请点这里
PostgreSQL 的下载地址:请点这里

本文永久更新链接地址:

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template