但行好事
莫论前程❤

PostgreSQL安装手册

参考来源:https://www.postgresql.org/download/linux/redhat/

安装步骤

  • Install the reposity RPM;
    yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-redhat10-10-1.noarch.rpm
    

如果出现文件下载失败.是因为丰台的机器不允许外网访问,需要将文件下载到自己的解析服务器中

  • Install the client package;
    yum install postgresql10
    
  • Optionally install the server packages:
    yum install postgresql10-server
    
  • Optionally initialize the database and enable automatic start:
    service postgresql-10 initdb
    chkconfig postgresql-10 on
    service postgresql-10 start
    

Included in distribution

These distributions all include PostgreSQL by default. To install PostgreSQL from these repositories, use the yum command on RHEL 5,6 and 7, or dnf command on Fedora 24+:

yum install postgresql-server
dnf install postgresql-server

Which version of PostgreSQL you get will depend on the version of the distribution:


DistributionVersion
RHEL/CentOS/SL/OL 79.2(also supplies package rh-postgresql95 and rh-postgresql94 via SCL)
RHEL/CentOS/SL/OL 68.4(also supplies package postgresql92)
RHEL/CentOS/SL/OL 58.1 (also supplies package postgresql84)
Fedora 259.6
Fedora 249.4

Other Red Hat family distributions may ship a different version of PostgreSQL by default, check with your distribution vendor to be sure.

The repository contains many different packages including third party addons. The most common and important packages are (substitute the version number as required):

  • postgresql-client libraries and client binaries
  • postgresql-server core database server
  • postgresql-contrib additional supplied modules
  • postgresql-devel libraries and headers for C language development
  • pgadmin3 – pgAdmin III graphical administration utility

Post-installation

Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. To make your database installation complete, you need to perform these two steps:service postgresql initdbchkconfig postgresql onor, on Fedora 24 and other later derived distributions:
postgresql-setup initdbsystemctl enable postgresql.service systemctl start postgresql.service

Direct RPM download

If you cannot, or do not want to, use the yum based installation method, all the RPMs that are in the yum repository are available for direct download and manual installation as well.

Cross distribution packages

Generic RPM and DEB packages that provide a server-only distribution are avaliable for some 32 and 64-bit Linux distributions. These packages provide a single set of binaries and consistent packaging across different Linux distributions. They are designed for server installation where a GUI is not available and consistency across multiple distributions is a requirement.

Download the packages from BigSQL for all supported versions.

Note: The cross distribution packages do not fully integrate with the platform-specific packaging systems.

Interactive installer by EnterpriseDB

Download the installer certified by EnterpriseDB for all supported PostgreSQL versions.

This installer includes the PostgreSQL server, pgAdmin; a graphical tool for managing and developing your databases, and StackBuilder; a package manager that can be used to download and install additional PostgreSQL tools and drivers. Stackbuilder includes management, integration, migration, replication, geospatial, connectors and other tools.

This installer can run in graphical, command line, or silent install modes.

The installer is designed to be a straightforward, fast way to get up and running with PostgreSQL on Linux (Red Hat family Linux including CentOS/Fedora/Scientific/Oracle variants), Debian GNU/Linux and derivatives, Ubuntu Linux and derivatives, SuSE and OpenSuSE.

Advanced users can also download a tar.gz archive of the binaries, without the installer. This download is intended for users who wish to include PostgreSQL as part of another application installer.

Note: The installers do not integrate with platform-specific packaging systems.

Platform support

The installers are tested by EnterpriseDB on the following platforms. They may also work on other variations or versions:

PostgreSQL Version64 Bit Platforms32 Bit Platforms
10RHEL / CentOS / OEL 7.x & 6.xRHEL / CentOS / OEL 6.x
9.6RHEL / CentOS / OEL 7.x & 6.xRHEL / CentOS / OEL 6.x
9.5RHEL / CentOS / OEL 7.x & 6.xRHEL / CentOS / OEL 6.x
9.4RHEL / CentOS / OEL 7.x & 6.xRHEL / CentOS / OEL 6.x
9.3RHEL / CentOS / OEL 6.xRHEL / CentOS / OEL 6.x
9.2RHEL / CentOS / OEL 6.x, 5.xRHEL / CentOS / OEL 6.x, 5.x

Build from source

The source code can be found in the main file browser. Instructions for building from source can be found in the documentation.

赞(0) 打赏
未经允许不得转载:刘鹏博客 » PostgreSQL安装手册
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏